Hi
I have a VB6 wizard application that allows my users to run existing reports and create new reports.
My user's databases are identical with my development database except the server name and database name(MS-SQL server).
The proble is that I can't make the reports run on databases with different server and database names.
Here is the code that I use for ODBC connection:
For Each crDBTable In crDBTables
Set CPProperty = crDBTable.ConnectionProperties("User ID"
CPProperty.Value = "U_SMARTLOG"
Set CPProperty = crDBTable.ConnectionProperties("Password"
CPProperty.Value = "xxxxxxxxx"
Set CPProperty = crDBTable.ConnectionProperties("DSN"
CPProperty.Value = "SmartLog"
Set CPProperty = crDBTable.ConnectionProperties("Database"
CPProperty.Value = SelectedReport.DatabaseName
Next
Here is the code that I try to use for OLE DB Provider connection:
For Each crDBTable In crDBTables
Set CPProperty = crDBTable.ConnectionProperties("Data Source"
CPProperty.Value = SelectedReport.ServerName
Set CPProperty = crDBTable.ConnectionProperties("Initial Catalog"
CPProperty.Value = SelectedReport.DatabaseName
Set CPProperty = crDBTable.ConnectionProperties("User ID"
CPProperty.Value = "U_SMARTLOG"
Set CPProperty = crDBTable.ConnectionProperties("Password"
CPProperty.Value = "xxxxxxxxxxx"
Next
Am I missing something?
Thanks for the help.
Robert
Robert Ezri
robert@idioma.co.il
I have a VB6 wizard application that allows my users to run existing reports and create new reports.
My user's databases are identical with my development database except the server name and database name(MS-SQL server).
The proble is that I can't make the reports run on databases with different server and database names.
Here is the code that I use for ODBC connection:
For Each crDBTable In crDBTables
Set CPProperty = crDBTable.ConnectionProperties("User ID"
CPProperty.Value = "U_SMARTLOG"
Set CPProperty = crDBTable.ConnectionProperties("Password"
CPProperty.Value = "xxxxxxxxx"
Set CPProperty = crDBTable.ConnectionProperties("DSN"
CPProperty.Value = "SmartLog"
Set CPProperty = crDBTable.ConnectionProperties("Database"
CPProperty.Value = SelectedReport.DatabaseName
Next
Here is the code that I try to use for OLE DB Provider connection:
For Each crDBTable In crDBTables
Set CPProperty = crDBTable.ConnectionProperties("Data Source"
CPProperty.Value = SelectedReport.ServerName
Set CPProperty = crDBTable.ConnectionProperties("Initial Catalog"
CPProperty.Value = SelectedReport.DatabaseName
Set CPProperty = crDBTable.ConnectionProperties("User ID"
CPProperty.Value = "U_SMARTLOG"
Set CPProperty = crDBTable.ConnectionProperties("Password"
CPProperty.Value = "xxxxxxxxxxx"
Next
Am I missing something?
Thanks for the help.
Robert
Robert Ezri
robert@idioma.co.il