c# / Crystal Report , différence entre ReportDocument.SetDatabaseLogon et Table.ApplyLogOnInfo
bonjour,
Dans le cadre d'un projet, j'utilise crystal report. Travaillant sous différent environnement, j'ai mis dans mon code :
Code:
1 2 3 4 5 6 7 8 9 10 11 12
|
TableLogOnInfo m_tableLogon;
foreach (CrystalDecisions.CrystalReports.Engine.Table m_table in t.Database.Tables)
{
m_tableLogon = m_table.LogOnInfo;
m_tableLogon.ConnectionInfo.DatabaseName = myDatabase;
m_tableLogon.ConnectionInfo.ServerName = myServer;
m_tableLogon.ConnectionInfo.UserID = myUser;
m_tableLogon.ConnectionInfo.Password = myPwd;
m_table.ApplyLogOnInfo(m_tableLogon);
} |
j'aimerais remplacé ce code par
Code:
1 2
|
t.SetDatabaseLogon(myUser,myPwd,myServer,myDatabase); |
car cela semble plus simple. Mais je pense qu'il y a une différence entre ces deux codes, mais je ne comprend pas laquelle.
Si quelqu'un pouvais m'expliquez,
merci d'avance