|
-
Mar 31st, 2006, 12:30 PM
#1
Thread Starter
New Member
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
-
Mar 31st, 2006, 04:26 PM
#2
Lively Member
Re: CR 8.5, VB 6.0 and SQL Server 2000. Help !!!!
 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.
-
Mar 31st, 2006, 05:43 PM
#3
Re: CR 8.5, VB 6.0 and SQL Server 2000. Help !!!!
Post your vb code that connects/opens it in vb.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Apr 7th, 2006, 02:56 PM
#4
Thread Starter
New Member
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
-
Apr 7th, 2006, 03:49 PM
#5
Re: CR 8.5, VB 6.0 and SQL Server 2000. Help !!!!
What is Dash1?
You may need to use the .LogOnServer method too.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Apr 7th, 2006, 04:16 PM
#6
Thread Starter
New Member
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
-
Apr 7th, 2006, 04:22 PM
#7
Re: CR 8.5, VB 6.0 and SQL Server 2000. Help !!!!
Try .SetLogOnInfo to log you on to your datasource also.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|