PDA

Click to See Complete Forum and Search --> : Crystal 8.5 OCX and VB6 and MySQL


rasinc
Mar 20th, 2008, 09:02 PM
I have been having a problem changing ODBC data sources for Crystal Reports 8.5 through the OCX and ODBC 3.51.19 but only when the MySQL database is on another computer.

It works fine when I run the database on my development machine but when a database is on my network server, the same code does not work. The database, created by someone else and managed by their data management program can have different ports depending on how many databases are open at any one time. My program does read the proper ports and updates my own ODBC driver properly. When the database is on my machine, my code below works just fine and I can run any report I want. But the same reports cannot run on the database on my server.

I am updating the Crystal connection in my VB program with the proper port,
database, server, etc according to the code below. Any ideas what is wrong?

sConnect = "DSN=" & cProgramTitle & _
";UID=" & sUserID & ";PWD=" & sPassword & _
";SERVER=" & strHost & ";dsq=mydatabase;Port=" & strPort

I am getting error 20599 when running a report. Any ideas appreciated. TIA rasinc