#32001/11/16 16:35:14
在对方的服务器上用, 我用
以下是我的对方服务器上的dbconn的内容:
<%
'---- DataTypeEnum values ----
Const adEmpty = 0
Const adTinyInt = 16
Const adSmallInt = 2
Const adInteger = 3
Const adBigInt = 20
Const adUnsignedTinyInt = 17
Const adUnsignedSmallInt = 18
Const adUnsignedInt = 19
Const adUnsignedBigInt = 21
Const adSingle = 4
Const adDouble = 5
Const adCurrency = 6
Const adDecimal = 14
Const adNumeric = 131
Const adBoolean = 11
Const adError = 10
Const adUserDefined = 132
Const adVariant = 12
Const adIDispatch = 9
Const adIUnknown = 13
Const adGUID = 72
Const adDate = 7
Const adDBDate = 133
Const adDBTime = 134
Const adDBTimeStamp = 135
Const adBSTR = 8
Const adChar = 129
Const adVarChar = 200
Const adLongVarChar = 201
Const adWChar = 130
Const adVarWChar = 202
Const adLongVarWChar = 203
Const adBinary = 128
Const adVarBinary = 204
Const adLongVarBinary = 205
'---- ParameterDirectionEnum values ----
Const adParamUnknown = &H0000
Const adParamInput = &H0001
Const adParamOutput = &H0002
Const adParamInputOutput = &H0003
Const adParamReturnvalue = &H0004
%>
<% REM -- ADO command types
adCmdText = 1
adCmdTable = 2
adCmdStoredProc = 4
adCmdUnknown = 8
REM -- ADO cursor types
adOpenForwardOnly = 0 '# (Default)
adOpenKeyset = 1
adOpenDynamic = 2
adOpenStatic = 3
REM -- ADO lock types
adLockReadOnly = 1
adLockPessimistic = 2
adLockOptimistic = 3
adLockBatchOptimistic = 4
REM -- Used to check ADO Supports for Oracle
adApproxPosition = 16384
REM -- Database Error numbers for trapping:
const FORIEGN_KEY_CONSTRAINT = -2147217873
const PRIMARY_KEY_CONSTRAINT = -2147217900
const UNIQUE_CONSTRAINT = -2147217887
REM setup ADO connection
'On Error Resume Next
Set oa_db_connection = Server.CreateObject("ADODB.Connection")
oa_db_connection.ConnectionTimeout = 15
oa_db_connection.CommandTimeout = 30
oa_db_connection.Open "DSN=db_asp_oa;UID=dbasp_oa;PWD=dbasp_oa;"
Set cmdTemp = Server.CreateObject("ADODB.Command")
cmdTemp.CommandType = adCmdText
Set cmdTemp.ActiveConnection = oa_db_connection
'********************************************************
stdListRange=10
%>
按照以上设置运行后,提示:
错误类型:
Active Server Pages, ASP 0126 (0x80004005)
找不到包含文件 'http://10.10.29.33/include/db_define.asp'。
/test.asp, 第 2 行
test.asp
<%@ Language=VBScript %>
....