Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connect to DB using the CRAXDRT object?

Status
Not open for further replies.

PTW

Programmer
Jul 7, 2000
82
CA
Please forgive me if this question is really simple, but I am a relative novice and haven't had to do much coding in years!

I am calling a Crystal Report (8.5) from VB6, and then trying to export in a PDF format. I think I have the correct code, but I am having problems making the connection to the database. If I was using a Crystal Reports object, my connection would look like this:

CR1.Connect = "ODBC;DSN=DSNName;UID=UserName;PWD=Password;DATABASE=DBName"

According to the help file, I need to use this:
crxApplication.LogOnServer(pDllName As String, pServerName As String, [pDatabaseName], [pUserID], [pPassword])

The report connects to a SQL Server, so I tried as follows, but it did not work:

crxApplication.LogOnServer("SQLSRV32.DLL", "ActualServerName", "ActualDBName", "UserID", "Password")

The error said the library SQLSRV3d.DLL could not be found.

Am I on the right track using the .LogOnServer? Or do I need to use a different sort of connection object?

Thanks!
 
A quick search for 'CRAXDRT' returned many threads. One might be of help to you.

Such as thread222-1147478.

zemp
 
Thanks! I had done some searching and had looked through a lot of posts, but somehow I must have missed this one (I blame fatigue and noobishness).

Thank-you again...it seems to have worked.
 
Glad to hear that it worked!

And yes, you can search for the same thing on two separate days and not get the identical results. Just one of those things.

zemp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top