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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set LogonServer of QRY file at runtime

Status
Not open for further replies.

mchoss

Programmer
Feb 11, 2002
87
GB
Crystal 8.5
Integration method: RDC component(CRAXDRT)
Visual Basic 6
ODBC connection

As Crystal does not recognise the 'union' sql command, i have reports designed by using a *.qry file generated by the Crystal SQL designer. This requires an ODBC connection when it is created.

My problem is that my development environment is different to the application environment, as well as the fact that my app will need to run in a redundant database environment, so the reports will need to connect to either one of two databases at runtime depending on which is up.

For all my other reports i am using the SetLogonInfo method successfully from VB, however, with the reports based on *.qry files, the code just hangs at the viewreport command.

Can i set the database to which my *.qry file is to use at runtime via VB? Can i set the server using the Report's properties?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top