建立系统dsn,驱动为sybase数据库
<% set Conn1=server.createObject("ADODB.Connection") set RS1=server.createObject("ADODB.RecordSet") Conn1.Open "DSN=oadb;UID=sa;PWD=;DATABASE=oadb" RS1.activeconnection=Conn1 RS1.Source="select * from 表名" RS1.open %>
我看了看ODBC数据源
没有sybase的驱动
我也没有用过这个数据库
你看能不能就像sql那样,存取远程数据库?datasource=“远程数据库名”
我想应该类似把
oConn.Open "Driver={SYBASE SYSTEM 11};" & _ "Srvr=myServerName;" & _ "Uid=myUsername;" & _ "Pwd=myPassword;"
If using the Intersolv 3.10 Sybase ODBC Driver:
oConn.Open "Driver={INTERSOLV 3.10 32-BIT Sybase};" & _ "Srvr=myServerName;" & _ "Uid=myUsername;" & _ "Pwd=myPassword;"
For more information, see: Sybase System 10 ODBC Driver Reference Guide