I am using VB6, CR 4.6 and Access 2000 and I think there is a discrepancy in my database connection.
My global variable in my vb project is:
This connection is working for inserting, deleting, updating, etc. but I can't preview my Crystal Reports. It may have something to do with the way I set up my database connection in Crystal. I tried to use the Data File option, but it kept asking me for an Access password (there isn't a password so I just clicked cancel, then it told me my .mdb file is "not a known database type" so then I selected ODBC/SQL and set up my report and it works fine in Crystal. However, when I try to preview it from my VB program I get the following error:
Runtime error:20536 - Unable to Connect, incorrect logon parameters.
If I run the program in debug I can see that it craps out at the line crReport.Action = 1
How can I fix this? Thanks.
My global variable in my vb project is:
Code:
Set myConn = New ADODB.Connection
strDataSource = App.Path & "\InventoryV1.mdb"
With myConn
.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDataSource &";Persist Security Info=False"
.CursorLocation = adUseClient
.Open
End With
Runtime error:20536 - Unable to Connect, incorrect logon parameters.
If I run the program in debug I can see that it craps out at the line crReport.Action = 1
How can I fix this? Thanks.