Connecting with Visual Basic 6.0

Posted on 2006-03-20
Last Modified: 2012-08-13
I installed the Sybase Client 12.X and I'm trying to connect with VB6.0.  The current login string that I'm using is as followed:

strLogin = "Provider=Sybase ASE OLE DB Provider;" & _
"Srvr=Server,5000;" & _
"Catalog=DB;" & _
"User Id=user;" & _

But I keep getting "Invalid server name was specified."  I determined that it's coming from the Provider, it has to be because every other command that I remove comes down to the Provider generating it.  I've been having so much difficulty finding a good Sybase driver, without breaking my neck looking all over the country side.  I am wondering, maybe if the drivers that came with WinSQL would work if called apon?  I have tried it, but I got some odd error, that I was not sure about.

Please, I must get this working ASAP.
Question by:moorer2k
    LVL 29

    Accepted Solution

    I think the problem you are having is due to the fact that your server is named "Server". Other then that it looks fine to me. (


    Author Comment

    The server of course, is change correctly.  WinSQL tool connects ust fine, and I'm using those same perameters.
    LVL 29

    Expert Comment

    >The server of course, is change correctly

    I am not sure what you mean here.

    > WinSQL tool connects ust fine, and I'm using those same perameters.

    Maybe so, but the driver you are using with the VB app may not be ok with it, especially if it is a reserved keyword.

    Expert Comment

    Go to this website to get the correct connection string: you'll be able to find what you need to connect to sybase

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Join & Write a Comment

    This post first appeared at Oracleinaction  ( Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
    This paper addresses the security of Sennheiser DECT Contact Center and Office (CC&O) headsets. It describes the DECT security chain comprised of “Pairing”, “Per Call Authentication” and “Encryption”, which are all part of the standard DECT protocol.
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now