Skip to Content
Former Member
Jul 22, 2010 at 11:03 AM

Unable to change USER ID in Crystal 9 from VB6


I have made a report(crystal 9 talking to SQL server) and when I fire it from VB6 it works fine, as long as the user ID through which the report was made is not changed. But If I have a scenario where the user ID is changing the report still looks at the original USER ID.

I have got the following code to change the connection properties from the VB6 application.

For Each CrRepTable In CrRep.Database.Tables

CrRepTable.ConnectionProperties("Data Source") = mServerName

CrRepTable.ConnectionProperties("INITIAL CATALOG") = mDatabaseName

CrRepTable.ConnectionProperties("USER ID") = mUserID

CrRepTable.ConnectionProperties("PASSWORD") = mUserPassword


Now suppose the report has been made in CRW 9 with the user ID 'X'. At a user site, the database has been installed with user ID 'Y'. When the application fires the report it still tries to fire the report with the User ID 'X'.

I have been banging my head over this for a week now and have not progressed anywhere.