Link to home
Start Free TrialLog in
Avatar of bowemc
bowemc

asked on

C# Sybase ODBC connection

Hi,

How do I create a connection to a Sybase 11 or Sybase ASE database via ODBC with C# / .Net 1.1? I want to pass in iser id and password also to ensure its a valid user?

I hope you can help.

Thanks as ever
Avatar of brokeMyLegBiking
brokeMyLegBiking

Here is a great site which lists a ton of connection strings, including sybase:

http://www.connectionstrings.com
ASKER CERTIFIED SOLUTION
Avatar of brokeMyLegBiking
brokeMyLegBiking

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bowemc

ASKER

hi,

I've placed you code in a try catch block

cn.open throws an error - the error description is : {"ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified" }

Any ideas?
try a different connection string. try one of the odbc connections. (sorry i can't test because i don't have sybase)


Standard Sybase System 11
 
Driver={SYBASE SYSTEM 11};Srvr=myServerAddress;Uid=myUsername;Pwd=myPassword;Database=myDataBase;