主题:  请教!

johnhill

职务:普通成员
等级:1
金币:0.0
发贴:34
注册:2000/10/27 11:22:12
#12001/11/16 16:32:54
有一个,我想在另外一台服务器上调用,我用行不行?

我在对方的服务器上调用可以,但是在自己的win2k上编写的脚本,加上,还是出错呀!

我现在将对方的机器上的dbconn靠到自己的机器上,因为他的dbconn中定义了dsn,所以还是不能用,我只知道用户名和密码,不知道数据库和数据库服务器的地址,不能重写连接!

编辑历史:[这消息被johnhill编辑过(编辑时间2001-11-16 19:44:33)]
[这消息被johnhill编辑过(编辑时间2001-11-16 19:46:15)]


johnhill

职务:普通成员
等级:1
金币:0.0
发贴:34
注册:2000/10/27 11:22:12
#22001/11/16 16:34:55
..

编辑历史:[这消息被johnhill编辑过(编辑时间2001-11-16 16:35:51)]


johnhill

职务:普通成员
等级:1
金币:0.0
发贴:34
注册:2000/10/27 11:22:12
#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 %>



....