server logon problems using vb6 and crystal9

I have been reading problems and solutions on your forum pertaining to this for the last few hours and cannot get any solutions to work.  I have an active x connection on my VB form with a connection to the sq2000 view that the crystal report will need.  I have added the crviewer.  I get the message "logon failed for user myuserid"  I have supplied the user and password in the adodbc properties.  I have resupplied then in a further connection definition.  Somehow, crystal is not retaining these values.

Who is Participating?

Improve company productivity with a Business Account.Sign Up

avi247Connect With a Mentor Commented:
Try it this way "crdb_ado.dll","server name","dbname","userid","password"


conn ="crdb_ado.dll","server name","dbname","userid","password")
mlmccConnect With a Mentor Commented:
Can you supply the code you are using?

dstratfordAuthor Commented:
OK the basics are:
dim crystal as craxdrt.application
dim report as
crviewer.displayborder = false
criewer.displaytabs = false
crviewer.enabledrilldown = false
crviewer.enablerefeshbutton = false

(after pressing start on form)
set crystal = new craxdrt.application
set report = crystal.openreport("the path" & "the report name")
crviewer.reportsource = report

(somehow crystal is loosing the logon values in the active x and I can't seem to find the correct syntax to pass them on
to crystal at the time crystal is logoning on to the server.  Have tried using"crdb_ado.dll",the server,the database,the passwork) but I keep getting syntax errors.
and also substituting "pdsodbc.dll" for "crdb_ado.dl"l.  If I could get the correct syntax here, that might be the solution)
What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

frodomanConnect With a Mentor Commented:
When you used logonserver did you specifiy the userID?  It's missing from your example above:

>>"crdb_ado.dll",the server,the database,the passwork)

Correct syntax is:  LogOnServer(pDllName as string,pServerName as String,[pDatabaseName],[pUserID],[pPassword])

dstratfordAuthor Commented:
I did not use the user id as in a previous example on your forum DRRYAN3 omitted this.  I will try your I put each value in quotes as he did? or do I need the square barackets?
frodomanConnect With a Mentor Commented:
Quotes - the square brackets denote an optional parameter - if you specify password though you must specify user as well.
dstratfordAuthor Commented:
I have tried the above and am still getting syntax is looking for an = sign at the end.  I am wondering if I even have these .dll files.  
Meanwhile, I see on that this is a know issue and they have a fix.  I will try that and post the results at least sometime tommorrow.
dstratfordAuthor Commented:
I have downloaded the crystal9  fix and retried my program with no success.
I get syntax error, expecting =  to the line:"crdb_ado.dll","server name","dbname","userid","password")

dstratfordAuthor Commented:
I just tried both of your suggestions and I get the error message for that line:
"object does not support this property or method"

I have reviewed my VB references and components. Hope you are not giving up.
frodomanConnect With a Mentor Commented:
Have you tried removing the "crystal" reference from the call?  Since you've already executed "set report=..." you should be able to use report.logonserver "dll", "server", "dbname", "user", "pword"

dstratfordAuthor Commented:
Thank you so much for all your help.  My problem has been solved by the following 2 steps:
1.  Download the service pack from crystal decisions to allow the use of integrated security by adding a registry key and changing the value of this key to yes.  
2.  On the crystal report check the box for integrated security and leave userid and password blank.

This problem can be closed.
Glad i could help

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.