We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you a podcast all about Citrix Workspace, moving to the cloud, and analytics & intelligence. Episode 2 coming soon!Listen Now


Connecting with Visual Basic 6.0

moorer2k asked
Medium Priority
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.
Watch Question

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. (http://www.carlprothman.net/Default.aspx?tabid=87#OLEDBProviderForSybaseAdaptiveServerEnterprise)


Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts


The server of course, is change correctly.  WinSQL tool connects ust fine, and I'm using those same perameters.
>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.

Go to this website to get the correct connection string: http://www.connectionstrings.com/ you'll be able to find what you need to connect to sybase
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.