2006-6-20 16:06
tzccmtb
ASP连接ORACLE的问题,请高手指教
12.asp代码如下
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="Connections/sj.asp" -->
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_sj_STRING
Recordset1.Source = "SELECT * FROM SCOTT.ACCOUNT"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[url]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd[/url]">
<html xmlns="[url]http://www.w3.org/1999/xhtml[/url]">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<%=(Recordset1.Fields.Item("BALANCE").Value)%>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
sj.asp 代码如下
<%
' FileName="Connection_odbc_conn_dsn.htm"
' Type="ADO"
' DesigntimeType="ADO"
' HTTP="false"
' Catalog=""
' Schema=""
Dim MM_sj_STRING
MM_sj_STRING = "dsn=sj;uid=system;pwd=manager;"
%>
代码都是DREAMWEAVER生成的,但是打开网页出错,请教大家有什么问题?
报错如下
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
/12.asp, 第 8 行