Partager via


Table.ApplyLogOnInfo Méthode

Met à jour les modifications apportées à l'objet TableLogOnInfo renvoyé par le biais de la propriété Table.LogOnInfo.

[Visual Basic]

Public Overrideable Sub ApplyLogOnInfo( _
   ByVal value As CrystalDecisions.Shared.TableLogOnInfo _
)

[C#]

public virtual void ApplyLogOnInfo(
   CrystalDecisions.Shared.TableLogOnInfo value
);

Paramètres

  • value
    Contient les informations de connexion.

Exemple

[Visual Basic]

      Private Sub LogonToReport _
         (ByVal server As String, ByVal database As String, _
         ByVal ID As String, ByVal password As String)
      
         Dim logonInfo As New TableLogOnInfo()
         Dim table As Table
      
         For Each table In Report.Database.Tables
            logonInfo = Table.LogOnInfo
            logonInfo.ConnectionInfo.ServerName = server
            logonInfo.ConnectionInfo.DatabaseName = database
            logonInfo.ConnectionInfo.UserID = ID
            logonInfo.ConnectionInfo.Password = password
            
            Table.ApplyLogOnInfo(logonInfo)
         Next table
      End Sub 
      
[C#]

      private void LogonToReport(string server, string database,
         string ID, string password)
      {
         TableLogOnInfo logonInfo = new TableLogOnInfo();
         foreach(Table table in Report.Database.Tables)
         {
            logonInfo = table.LogOnInfo;
            logonInfo.ConnectionInfo.ServerName = server;
            logonInfo.ConnectionInfo.DatabaseName = database;
            logonInfo.ConnectionInfo.UserID = ID;
            logonInfo.ConnectionInfo.Password = password;
            
            table.ApplyLogOnInfo(logonInfo);
         }
      }
      

Configuration requise

Espace de noms CrystalDecisions.CrystalReports.Engine

Assembly CrystalDecisions.CrystalReports.Engine (CrystalDecisions.CrystalReports.Engine.dll)

Voir aussi

Table Classe | Table Membres | CrystalDecisions.CrystalReports.Engine 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/