Function DBConnect()
Dim vConnString, wfConnection, objConn
set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open Application("DB_CONNECT")
set DBConnect = objConn
exit function
Response.Write("connected to Server 2008")
End Function
Function GetValue()
Dim objCmd, objRS
Set objCMD = Server.CreateObject("ADODB.Command")
Set objRs = Server.CreateObject("ADODB.Recordset")
With (objCMD)
.ActiveConnection = DBConnect()
.CommandType = adCmdStoredProc
.CommandText = "select * from Acc.dbo.table"
set ObjRS = .Execute()
End With
if err.number = 0 then
if not objRs.EOF then
arrData = objRs.GetRows
vDesc = arrData(5,0)
else
vDesc = vValue
end if
GetDescFromCode = True
end if
响应即将来临
connected to Server 2008
在调试的时候,我知道它不会进入objRs.EOF如果循环......任何想法都错了
答案 0 :(得分:0)
exit function
之前有response.write
。