TableLogOnInfos.Add Méthode
Ajoute un objet TableLogOnInfo object à la collection.
[Visual Basic]
Public Overrideable Function Add( _
ByVal logOnInfo As Object _
) As Integer
[C#]
public virtual int Add(
object logOnInfo
);
Paramètres
- logOnInfo
L'objet TableLogOnInfo ajouté à la collection TableLogOnInfos.
Valeur renvoyée
Indique l'emplacement de TableLogOnInfo dans la collection.
Remarques
La collection TableLogOnInfos doit contenir un objet TableLogOnInfo pour chaque table figurant dans le rapport. Cela permet de garantir que le moteur peut établir une connexion pour chaque table. Si une connexion ne peut pas être établie, une boîte de dialogue de connexion sera affichée.
Exemple
[Visual Basic]
Private Function AddLogOnInfo(ByVal server As String, ByVal _
database As String, ByVal userID As String, ByVal password As _
String, ByVal table As String, ByVal LogOnInfos As _
TableLogOnInfos) As TableLogOnInfos
Dim logOnInfo As New TableLogOnInfo()
logOnInfo.ConnectionInfo.ServerName = server
logOnInfo.ConnectionInfo.DatabaseName = database
logOnInfo.ConnectionInfo.UserID = userID
logOnInfo.ConnectionInfo.Password = password
logOnInfo.TableName = table
tableLogOnInfos.Add(logOnInfo)
AddLogOnInfo = tableLogOnInfos
End Function
[C++]
static TableLogOnInfos* AddLogOnInfo
(String* server, String* database, String* userID, String*
password, String* table, TableLogOnInfos* tableLogOnInfos)
{
TableLogOnInfo* logOnInfo = new TableLogOnInfo ();
logOnInfo->ConnectionInfo->ServerName = server;
logOnInfo->ConnectionInfo->DatabaseName = database;
logOnInfo->ConnectionInfo->UserID = userID;
logOnInfo->ConnectionInfo->Password = password;
logOnInfo->TableName = table;
tableLogOnInfos->Add(logOnInfo);
return tableLogOnInfos;
};
[C#]
private TableLogOnInfos AddLogOnInfo
(string server, string database, string userID, string
password, string table, TableLogOnInfos tableLogOnInfos)
{
TableLogOnInfo logOnInfo = new TableLogOnInfo ();
logOnInfo.ConnectionInfo.ServerName = server;
logOnInfo.ConnectionInfo.DatabaseName = database;
logOnInfo.ConnectionInfo.UserID = userID;
logOnInfo.ConnectionInfo.Password = password;
logOnInfo.TableName = table;
tableLogOnInfos.Add(logOnInfo);
return tableLogOnInfos;
}
Configuration requise
Espace de noms CrystalDecisions.Shared
Assembly CrystalDecisions.Shared (CrystalDecisions.Shared.dll)
Voir aussi
TableLogOnInfos Classe | TableLogOnInfos Membres | CrystalDecisions.Shared Espace de noms
©2005 Business Objects SA. Tous droits réservés.
Business Objects SA. http://www.france.businessobjects.com/ Services de support http://www.businessobjects.com/support/ |