"Cannot Connect to SQL Server" Error when Running Crystal reports from VB6 program

We have a program written in VB6 that connects to a DB2 database and generates a crystal report based on user input.  The problems occurs after a new install, when the program attempts to write a crystal report, it gives the error message "Cannot Connect to SQL Server"  I believe the problem is somewhere in the .dll files that control crystal reports, but I do not know how to fix the problem.  The program does in fact connect to the DB2 database because it runs a SELECT statement on the database when the program starts.  There are several computers that the program runs fine on, so I know the connection string is correct.  Is there a tool I can use that wil make sure the correct .dll files are in place or is the problem somewhere else?

Thanks, Any help is greatly appreciated.
asubigsaxyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

frodomanCommented:
What driver are you using to connect to DB2?  I've tried several but the only one that seems to actually work correctly most of the time is the Client Access drivers.  I suspect that what you're encountering is a specific error (user access privaledges, etc.) but the driver is returning a very generic message.
0
asubigsaxyAuthor Commented:
We install the DB2 (v7.2) Run-time Client that was provided by IBM to set up the DSN for the connection.  
0
frodomanCommented:
There is more than one client but based on the version # I am guessing that this is the Client Express driver.  The first thing I'd check is if the computers that work have the same version of the driver as those that don't -- It's possible that the more recent version doesn't work the same way as the older ones.

If you have a standalone copy of Crystal, you might want to try running this report on one of the problem machines in the Crystal environment.  Sometimes you get a better error message there than you get coming back through an api.

frodoman
0
JavaScript Best Practices

Save hours in development time and avoid common mistakes by learning the best practices to use for JavaScript.

asubigsaxyAuthor Commented:
Thanks Frodoman,

The same driver is installed on each machine.

The crystal design enviroment is not installed on any of the problem machines, but I think our license would allow us to do that.  Something in the .dll files that fire up crystal reports must be messed up, but I dont really know much about how .dll files work.
0
frodomanCommented:
>>> I think our license would allow us to do that.

Yea, as long as you aren't using your own copy at the time you should legally be able to install it and 'work' on another machine for a little while to see if you get a better error message.

You might just want to try reinstalling the dll files for Crystal (I assume you're using one of the merge modules to do it) - maybe something got corrupted there.  
0
asubigsaxyAuthor Commented:
The VB6 program installs the .dll files, but I am not familiar with merge modules.
0
asubigsaxyAuthor Commented:
Also, we use crystal reports 8.5
0
frodomanCommented:
Can you reinstall the VB6 program or will that make a mess of things?
0
asubigsaxyAuthor Commented:
I have re-installed it many times on one machine, the program was written by my predecessesor, maybe some windows update created a file version problem, I've read that can cause the error -- but I am kinda clueless as to what .dll files are required for it to operate sucessfully --
0
frodomanCommented:
That certainly could be the case - particularly if a newer dll was installed then when you reinstall the vb6 app it won't overwrite a newer dll with an older one.

You can try using the free FILEMON tool ( http://www.sysinternals.com/Utilities/Filemon.html ) while running the application.  It will show you all of the dll's that are accessed but you may have a lot to sift through unless you can isolate this application.  I'd stop everything else on the machine from running that you can before using FileMon.

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
asubigsaxyAuthor Commented:
The .dll driver the program was using was an old p2soledbc.dll  We rewrote the code to use a new p2odbc.dll -- The crystal report driver was getting the login info from the DB2 driver on the client machine, so only one user could correctly access the program.  The new .dll uses the windows login so that anyone who logs in can use the program.  I think it was developed way back in the day when there was only one user per computer.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.