CR 8.5, VB 6.0 and SQL Server 2000. Help !!!!
Greeting All,
I now update my database to SQL Server 2000 from 6.5. The VB app now gives me an error: "Error detected by database DLL." when I connect to SQL Server 2K. It works fine with SQL Server 6.5.
One thing to note is that when I am in CR 8.5, open the report, connect to SQL Server 2K and it works fine. It only gives me error when I connect thru VB 6.0
Please let me know if I miss any thing.
Thank you for your time,
Con Ki
Re: CR 8.5, VB 6.0 and SQL Server 2000. Help !!!!
Quote:
Originally Posted by Con Ki
Greeting All,
I now update my database to SQL Server 2000 from 6.5. The VB app now gives me an error: "Error detected by database DLL." when I connect to SQL Server 2K. It works fine with SQL Server 6.5.
One thing to note is that when I am in CR 8.5, open the report, connect to SQL Server 2K and it works fine. It only gives me error when I connect thru VB 6.0
Please let me know if I miss any thing.
Thank you for your time,
Con Ki
The most obvious start would be to check the connection string if you use one or the DSN if you use that. Then make sure you have the latest MDAC (2.8 I believe) from Microsoft. Try looking at those and then see what happens.
Re: CR 8.5, VB 6.0 and SQL Server 2000. Help !!!!
Post your vb code that connects/opens it in vb.
Re: CR 8.5, VB 6.0 and SQL Server 2000. Help !!!!
Thank you all for your reply,
I think it is some thing to do with the dbo permission.
The source of data for the report is the stored procedure.
From VB, if I connect using sa login, it works OK.
Here is the connect string constructed from the login form:
gConnectString = "Provider=sqloledb.1;Database=" & gDatabase & ";" & _
"Server=" & gServer & ";uid=" & strUserId & _
";pwd=" & strPassword
Note that gConnectString is a global variable.
and now execute the report:
'connect to SQL Server
Dash1.Connect = gConnectString
'Send report to preview window
Dash1.Destination = 0
'Set preview window state to "maximized"
Dash1.WindowState = 2
'Specify file name containing Crystal Report
Dash1.ReportFileName = gReportDir & "dash1.rpt"
'Dash1.ReportFileName = gReportDir & "test1.rpt"
'Specify report parameter
Dash1.StoredProcParam(0) = CIIC
'Generate report
Dash1.Action = 1
I think I will have to some how specify dbo in the CR environment to recompile the report first, but still figure out.
Please let me know if you have any idea.
Thanks a lot.
ConKi
Re: CR 8.5, VB 6.0 and SQL Server 2000. Help !!!!
What is Dash1?
You may need to use the .LogOnServer method too.
Re: CR 8.5, VB 6.0 and SQL Server 2000. Help !!!!
Dash1 is the name of the CrystalReport control.
In CR environment, the source of this CR report is the stored procedure.
I think I need to add dbo when specifying the source of the report so that it can work with other regular user, not only sa.
Please let me know what you think.
Thank you so much for your time,
Con Ki
Re: CR 8.5, VB 6.0 and SQL Server 2000. Help !!!!
Try .SetLogOnInfo to log you on to your datasource also.