Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal Reports from VB 6 1

Status
Not open for further replies.

chindas

Programmer
May 18, 2006
14
0
0
ES
Hi all,

I have a embedded Crystal Reports working fine in my VB6 app.

When I try to change the database name to 'database_test', then the report still is trying to connect to the initial database I used in the reports designer from VB.


CRREP.Database.Tables(1).ConnectionProperties.Item("initial catalog") = "database_test"


When I check the SQL query string asking from VB inmediate window after setting connection property, it shows every field preceeded with the database I used initially when I designed the report ie, "DATABASE"."DBO"."MY_TABLE" in place of "DATABASE_TEST"."DBO"."MY_TABLE"

How could I change the database prefix on every field from "database" to "database_test"?

Thanks all
 
Have a look at faq768-5374 for an option that uses the SetLogOnInfo method instead of ConnectionProperties.

SetLogOnInfo is deprecated, but still works up to CR XI.

-dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top