Tuesday, July 10, 2012

Connection strings for Sybase Adaptive Server Enterprise

Standard

Data Source='myASEserver';Port=5000;Database=myDataBase;Uid=myUsername;Pwd=myPassword;

Using the sql.ini file

If the server isn't aliased, you have to use the ip address and port number in the connection string, not ideal as these may change occassionally. Installing sybase on a machine, you will have a "sql.ini" file that maps an alias name to an ip address and a port. That file can be rolled out to all users, and the sql.ini updated when necessary. Use the following connection string to force the AseConnection object to use the interface file.
DSURL='file://c:\sybase\ini\sql.ini?SQL_MIDOFF_OPC1';Database=myDataBase; UID=myUsername;PWD=myPassword;APP=myAppName;

Standard

Provider=ASAProv;Data source=myASA;

TCP/IP

Provider=ASAProv.90;Eng=server.database_name;Uid=myUsername;Pwd=myPassword; Links=tcpip(Host=servername);

With Data Source .IDS file

Provider=Sybase ASE OLE DB Provider;Data source=myASE;
Note that you must create a Data Source .IDS file using the Sybase Data Administrator. These .IDS files resemble ODBC DSNs.

Adaptive Server Enterprise (ASE) alternative 1

Provider=Sybase.ASEOLEDBProvider;Srvr=myASEserver,5000;Catalog=myDataBase;User Id=myUsername;Password=myPassword;
 

Share : Connection strings for Sybase Adaptive Server Enterprise

Related Posts

Connection strings for Sybase Adaptive Server Enterprise
4/ 5
Oleh