在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
以15.5版本为例 首先下载sybase oledb15.5的驱动,下载地址如下: http://download.csdn.net/detail/tg01/3608486 数据连接字符串如: Provider=ASEOLEDB;Data Source=ip:5000;Catalog=数据库名称;User Id=用户名;Password=密码; 附sybase数据库连接字符串 http://www.connectionstrings.com/sybase-adaptive ASE ADO.NET Data ProviderStandardData Source='myASEserver';Port=5000;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
Using the sql.ini fileIf 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;
Adaptive Server Anywhere OLE DB ProviderStandardProvider=ASAProv;Data source=myASA;
TCP/IPProvider=ASAProv.90;Eng=server.database_name;Uid=myUsername;Pwd=myPassword; Links=tcpip(Host=servername);
Use this when connecting to a server located on the other side of a router. Without the Links=tcpip(Host=servername) the error "Server could not be found" can arise when connecting. Sybase ASE OLE DB ProviderWith Data Source .IDS fileProvider=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 1Provider=Sybase.ASEOLEDBProvider;Srvr=myASEserver,5000;Catalog=myDataBase;User Id=myUsername;Password=myPassword;
Some reports on problem using the above one, try the following as an alternative. Adaptive Server Enterprise (ASE) alternative 2Provider=Sybase.ASEOLEDBProvider;Server Name=myASEserver,5000;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;
Some other reports on problem using the above one, try the following as an alternative Adaptive Server Enterprise (ASE) 12.5Provider=Sybase.ASEOLEDBProvider.2;Server Name=myASEserver;Server Port Address=5000;Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword;
This one works only from Open Client 12.5 where the server port number feature works, allowing fully qualified connection strings to be used without defining any .IDS Data Source files. Adaptive Server Enterprise (ASE) 15.0Provider=ASEOLEDB;Data Source=myASEserver:5000;Catalog=myDataBase;User Id=myUsername;Password=myPassword;
Adaptive Server Enterprise (ASE) 15.0 alternativeThis one is included because of reported problems with using the "Catalog" key which was solved by using the 12.5 syntax key "Initial Catalog" instead. Provider=ASEOLEDB;Data Source=myASEserver:5000;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;
.NET Framework Data Provider for OLE DBBridging to Adaptive Server Anywhere OLE DB ProviderThis is just one connection string sample for the wrapping OleDbConnection class that calls the underlying OLEDB provider. See respective OLE DB provider for more connection strings to use with this class. Provider=ASAProv;Data source=myASA;
Adaptive Server Enterprise ODBC driverAdaptive Server Enterprise 15.0Driver={Adaptive Server Enterprise};app=myAppName;server=myServerAddress;port=myPortnumber; db=myDataBase;uid=myUsername;pwd=myPassword;
The key "app" is optional Standard Sybase System 12 Enterprise Open ClientDriver={SYBASE ASE ODBC Driver};Srvr=myServerAddress;Uid=myUsername;Pwd=myPassword;
Standard Sybase System 12.5 Enterprise Open ClientDriver={SYBASE ASE ODBC Driver};NA=Hostname,Portnumber;Uid=myUsername;Pwd=myPassword;
TDS based ODBC driver (from Sybase OCS 12.5)Driver={Sybase ASE ODBC Driver};NetworkAddress=myServerAddress,5000;Db=myDataBase; Uid=myUsername;Pwd=myPassword;
Standard Sybase System 11Driver={SYBASE SYSTEM 11};Srvr=myServerAddress;Uid=myUsername;Pwd=myPassword;Database=myDataBase;
Intersolv 3.60StandardDriver={INTERSOLV 3.60 32-BIT Sybase};Srvr=myServerAddress;Database=myDataBase; Uid=myUsername;Pwd=myPassword;
Intersolv 3.10Intersolv 3.10Driver={INTERSOLV 3.10 32-BIT Sybase};Srvr=myServerAddress;Uid=myUsername;Pwd=myPassword;
Sybase SQL Anywhere (former Watcom SQL) ODBC driverImportant note!<br/>The quota " in the string needs to be escaped using your language specific escape syntax.<br/> c#, c++ \"<br/> VB6, VBScript ""<br/> xml (web.config etc) &quot;<br/> or maybe use a single quota '. The empty DSN parameter is indeed critical as not including it will result in error 7778. .NET Framework Data Provider for ODBCBridging to Adaptive Server Enterprise ODBC driverThis is just one connection string sample for the wrapping OdbcConnection class that calls the underlying ODBC Driver. See respective ODBC driver for more connection strings to use with this class. Driver=={Adaptive Server Enterprise};server=myServerAddress;port=myPortnumber; db=myDataBase;uid=myUsername;pwd=myPassword;
|
请发表评论