Print Page | Close Window

Connect to Crystal reports with visual basic 6

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2022
Forum Name: Data Connectivity
Forum Discription: How to connect to data sources and export reports
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=13980
Printed Date: 22 Apr 2025 at 4:03pm


Topic: Connect to Crystal reports with visual basic 6
Posted By: itig
Subject: Connect to Crystal reports with visual basic 6
Date Posted: 05 Aug 2011 at 12:02am
Hello,
 
I've been given a visual basic project to debug.
 
The program basically conects to a sql server and then connects to crystal reports and generates a pdf file with client data
 
The issue is that the program works fine on the main server, but i cant get it to work on the test server.
 
while im debugging the project, the connection to sql server works fine but then i encounter an error when executing this line:
 
Set objCrysApp = New CRAXDRT.Application
 
objCrysApp.LogOnServerEx "ado.dll", "server name", "data base name", "user", "password", "OLE DB", "Provider=SQLOLEDB.1;Persist Security Info=True;"
 
the error message:
 
Configuration Error.
File could not be opened because the library "ado.dll" cannot be found.
 
I dont really know how the logonserverex method works, i've investigated on the internet but i cant really find anything useful to help me
 
Im executing the project from a client machine
 
and i would like to know where should this "ado.dll" be located?
 
client machine or server machine and what path?
 
the connection is working with ole db,
 
i've seen in other forums that i can use an odbc connection like:
 
objCrysApp.LogOnServer "pdsodbc.dll", "server", "database", "user", "password"
 
but i've tried this and configured an odbc dns and the same error comes up
 
Configuration Error.
File could not be opened because the library "pdsodbc.dll" cannot be found.
 
 
im using Crystal reports 9
visual basic 6
sql server 2000
windows xp sp2
 
thank u



Replies:
Posted By: servo
Date Posted: 20 Aug 2011 at 8:51pm
hi,

i used to have a problem like that. what you do is

1. search and copy ado.dll from where the program works
2. in the vb 6.0 compiler (i use innoscript), include the ado.dll in the list of resources/files so it can be included in the deployment package.


that should do it. post if you have more questions



Print Page | Close Window