Changing Datasource in VB not working
Posted on 2004-04-26
I am trying to change the Datasource dynamically without success:
Select Case UCase(.DllName)
.ConnectionProperties.Add "Connection String", gConnStrMaster
'.ConnectionProperties.Add "DSN", gDSN
.ConnectionProperties.Add "Database", gDBName
'.ConnectionProperties.Add "Trusted_Connection", IIf(gTrusted, 1, 0)
'If Not gTrusted Then
' .ConnectionProperties.Add "User ID", gServerUID
' .ConnectionProperties.Add "Password", gServerPwd
and I run this on each table, and the sub-reports.
The report was built using a DSN = "EDI_Desktop", and Database name = "EDI_Desktop".
I'm running a VB app in development, and the report is supposed to run from DSN = "Development" and DB name "Development".
With the above code, I'm still getting an error:
42502 [ODBC SQL Server Driver] Invalid Object name 'EDI_Desktop.dbo.Order Header'
I have followed the examples provided on the KB, to no avail.