pass sql server connection at runtime, CR XI, VB 6
I have been developing Crystal reports since version 4 using VB3, VB5 and VB6 and Access databases. I had al the routines built to modify the Acces table locations at runtime for easy deployment to client systems.
Now I have built an application using VB6 and SQL Server 2005. I used the OLE DB (ADO) connection. I built my reports hard coded to my development database connection. Now at runtime on my client pc with a different database name my report fails. I have looped through the tables collection and set the ConnectBufferString to the local sqlserver connection string. I tried setting the data source to my ado connection string in the VB code. (CrystalReport.Database.SetDataSource adoP21, 3)
What I get on the runtime pc is a "Cannot find table xxxx, do you want to remove....?". When I answer no, it pops a message box indicating that it is trying to find the table with the database named on my development pc. Indicates that my overrides have not worked.
Any thoughts or sample code appreciated.