asp怎么连接oracle数据库
有人知道如何编写 asp 链接 oracle数据的 代码吗?网上找了一段 运行不对Set OraSession=CreateObject( "OracleInProcServer.XOraSession ")
Set OraDatabase=OraSession.DbOpenDatabase( "DSN", "用户名/密码",0)
dsn=odbc dsn,user=username,pwd=password
Set OraDynaset=ebOraDatabase.DbCreateDynaset(sSql,0)
不知这段代码如何使用
其中DSN 如何配置呢?
我的 oracle 数据库:
tnsnames.ora
# TNSNAMES.ORA Network Configuration File: E:\oracle\ora92\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
LABEL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = MICROSOF-712C66)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = label)
)
)
INST1_HTTP =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = MICROSOF-712C66)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = SHARED)
(SERVICE_NAME = MODOSE)
(PRESENTATION = http://HRService)
)
)
listener.ora
# LISTENER.ORA Network Configuration File: E:\oracle\ora92\network\admin\listener.ora
# Generated by Oracle configuration tools.LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = MICROSOF-712C66)(PORT = 1521))
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = label)
(ORACLE_HOME = E:\oracle\ora92)
(SID_NAME = label)
)
)