views:

170

answers:

2

Hi,

I am having SYBASE 12.5 install on my server as well as my PC, I am unable to get the correct connection string.

I have used the connectionstrings.com but unable to get the correct one.

After runnig and making the connection

Driver={Sybase ASE ODBC Driver};srvr=server_name;database=database_name;UID=user_name;PWD=pass;

and some other combination of thic connection string

I am getting the Datasource ="" Driver ="" DataBase="" ServerVersion = Invalid Operation. Connection is closed

What am I suppose to correct in that.

Please help.

Thanks

+1  A: 

I've not worked with Sybase, but I think this page at connectionstring.com can surely help you.

TheVillageIdiot
I tried with that but none are workign for me
Nits
A: 

I do not see a port declared in your connection string so I wonder if that is the problem. Regardless, a trick you might try if you are using Windows is:

  1. Create a text file on your desktop (e.g. Foo.txt)
  2. Rename the file with a udl extension (e.g. Foo.udl).
  3. Double-click the file. This should open the ODBC properties page (aka Data Link Properties) where you can build your connection string and test the connection. Since the file is still at its heart a text file, you can then open the file in a text editor and it will provide the connection string for you.
Thomas
In provider list I can't find Sybase odbc provider. What I am getting is sybase Oledb provider.
Nits
@nitinkhanna - That would seem to indicate that you do not have the Sybase ODBC driver installed on your machine.
Thomas