Results 1 to 4 of 4

Thread: VB5, ODBC and SQL Server 6.5 problem

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2000
    Posts
    3
    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.

  2. #2
    Hyperactive Member
    Join Date
    Mar 2000
    Posts
    461
    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

  3. #3

    Thread Starter
    New Member
    Join Date
    May 2000
    Posts
    3
    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.

  4. #4

    Thread Starter
    New Member
    Join Date
    May 2000
    Posts
    3
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width