TableLogOnInfos.Add Methode

Fügt der Auflistung ein TableLogOnInfo-Objekt hinzu.

[Visual Basic]

Public Overrideable Function Add( _
   ByVal logOnInfo As Object _
) As Integer

[C#]

public virtual int Add(
   object logOnInfo
);

Parameter

  • logOnInfo
    Das TableLogOnInfos-Auflistung hinzuzufügende TableLogOnInfo-Objekt.

Rückgabewert

Gibt die Position von TableLogOnInfo in der Auflistung an.

Hinweise

Die TableLogOnInfos-Auflistung muss ein TableLogOnInfo-Objekt für jede im Bericht aufgeführte Tabelle enthalten. So wird sichergestellt, dass das Modul in der Lage ist, eine Verbindung für jede Tabelle herzustellen. Wenn keine Verbindung hergestellt werden kann, wird ein Anmeldedialogfeld angezeigt.

Beispiel

In diesem Beispiel wird veranschaulicht, wie ein TableLogOnInfo-Objekt der TableLogOnInfos-Auflistung hinzugefügt wird. Die Funktion erfordert Verbindungsinformationen und eine TableLogOnInfos-Auflistung und gibt die TableLogOnInfos-Auflistung zusammen mit den hinzugefügten Informationen zurück.

[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;
      }
      

Anforderungen

Namespace CrystalDecisions.Shared

Assembly CrystalDecisions.Shared (CrystalDecisions.Shared.dll)

Siehe auch

TableLogOnInfos Klasse | TableLogOnInfos Elemente | CrystalDecisions.Shared Namespace

**

©2005 Business Objects SA Alle Rechte vorbehalten

Business Objects SA
http://germany.businessobjects.com/
Supportleistungen
http://germany.businessobjects.com/support/