saving Crystal Report ADO connection string or ODBC connection details with report

I have a Crystal Reports 8.5 report.
My DB is MySQL.
When I try to open the report from a VB6 application I'm told my access is denied - no password.
I fill in the password in the ODBC driver DSN configuration form
(and all is good - I test the connection and it works fine) and hit OK and save the report, it doesn't seems to solve the problem.
I build an ADO connection string (my preferred way) but it doesn't seemed to be saved with the report either.
How do I save the ODBC connection details with the report or set it by code?

Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

vidruConnect With a Mentor Commented:
If you're using the OCX (Crystal Report Control), use the Connect property:

With CrystalReport1
    .ReportFileName = "C:\YourReport.rpt"
    .Connect = "DSN=ODBC_DSN_Name;UID=Username;PWD=Password;DBQ=dbName"
    .Action = 1
End With

With the RDC (Report Designer Component) use the SetLogOnInfo method:

crxRpt.Database.Tables(1).SetLogOnInfo strServerOrDSNName, strDBNameOrPath, strUserID, strPassword

All Courses

From novice to tech pro — start learning today.