R
Roger Boesch
I try to set the connection parameters with the following code,
but the password is not set after a call to ApplyLogOnInfo.
What i am doing wrong ??
The call of TestConnectivity() brings: "Invalid Connection Parameter", but
the values are correct.
// Get the ConnectionInfo Object.
TableLogOnInfo logOnInfo = new TableLogOnInfo();
logOnInfo = m_document.Database.Tables[p_table].LogOnInfo;
ConnectionInfo connectionInfo = new ConnectionInfo();
connectionInfo = logOnInfo.ConnectionInfo;
// Set the Connection parameters.
connectionInfo.DatabaseName = p_database;
connectionInfo.ServerName = p_server;
connectionInfo.Password = p_password;
connectionInfo.UserID = p_user;
m_document.Database.Tables[p_table].ApplyLogOnInfo(logOnInfo);
// Test Connection
Table table = m_document.Database.Tables[p_table];
bool flag = table.TestConnectivity();
but the password is not set after a call to ApplyLogOnInfo.
What i am doing wrong ??
The call of TestConnectivity() brings: "Invalid Connection Parameter", but
the values are correct.
// Get the ConnectionInfo Object.
TableLogOnInfo logOnInfo = new TableLogOnInfo();
logOnInfo = m_document.Database.Tables[p_table].LogOnInfo;
ConnectionInfo connectionInfo = new ConnectionInfo();
connectionInfo = logOnInfo.ConnectionInfo;
// Set the Connection parameters.
connectionInfo.DatabaseName = p_database;
connectionInfo.ServerName = p_server;
connectionInfo.Password = p_password;
connectionInfo.UserID = p_user;
m_document.Database.Tables[p_table].ApplyLogOnInfo(logOnInfo);
// Test Connection
Table table = m_document.Database.Tables[p_table];
bool flag = table.TestConnectivity();