PDA

Click to See Complete Forum and Search --> : VB5, ODBC and SQL Server 6.5 problem


MWallace0
May 24th, 2000, 04:21 AM
I am having a strange problem.

I have developed an app in VB5 SP3 that makes an ODBC call to SQL Server 6.5 SP3.
When I install this app on a NT4 SP4 server the ODBC Call fails.
If I install VB5 on the Server the ODBC Call then works.

Here is my connection code:

Set Wks = DBEngine.CreateWorkspace("ODBC", "", "", dbUseODBC)
StrCn = "ODBC;DSN=SQLSRV;UID=XXX;PWD=XXX;DATABASE=QUEUE"
Set Cnn = Wks.OpenConnection("", dbDriverNoPrompt, False, StrCn)

Any help would be appreciated.

Gen-X
May 24th, 2000, 06:38 AM
It is probably the versions of the ODBC drivers (Specifically the SQL driver) that are different.

When you install VB5 on the machine you are also installing MDAC (Microsoft Data Access Controls) which includes all methods of connecting to different types of databases.

A Vanilla installation of Windows NT would probably only have certain versions of the drivers and possibly not the latest.

If you were to install your application AND all the latest drivers, dlls, ocx's and anything else your program used (See the Package and Deployment Wizard for this) then it would probably work. Don't forget VB5 applications are not stand alone... they need at least 10 other files installed at the same time (or already existing on the machine) in order to work properly.

It sounds like you might be just copying across your *.exe and forgetting that because your machine has VB5 installed it has already installed all the other files you need to run it while the other machine doesn't

MWallace0
May 24th, 2000, 08:15 PM
I am using the Package and Deployment Wizard for my
application.

Here is where is gets stranger. I installed my co-workers
app on the same server. It uses an almost identical connection
string. His application connects. I then try my app again thinking maybe
his installation installs some resources mine doesn't, but my app still doesn't work.

I will try installing the MDAC and let you know if that works.

Thanks for your input.

MWallace0
May 25th, 2000, 10:48 PM
I installed the MDAC and my app works. Thanks for
the tip.

It still doesnt explain why my co-workers app works
on the same server which is still bothering me.


Thanks again.