我继承了一个较旧的应用程序来管理。有人告诉我,它建立了ODBC连接和不同的连接。我试图确定我怀疑 - 这是所有ODBC。以下是两个连接对象:
1 -----------------------------
Function OpenConnection(ByRef vConn)
OpenConnection = True
On Error Resume Next
vConn.mode = 1 ' Read-Only
vConn.Open Application("DSN_MIS"), Application("DSN_MIS_USERNAME"), Application("DSN_MIS_PASSWORD")
if vConn.State = 0 Then
OpenConnection = False
End If
End Function
Set Conn = Server.CreateObject("ADODB.Connection")
If OpenConnection(Conn) = False Then
DM1Active = False
Else
DM1Active = True
End If
2 ---------------------------
If Request.Cookies("username") = "" Then
s = LCase(Request.ServerVariables("SCRIPT_NAME"))
If Mid(s, InStrRev(s, "/")+1, Len(s)) <> "cisgweb.asp" Then
Call ForceLogon()
Response.End
End If
End If
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.mode = 1 ' Read-Only
conn.cursorlocation=3
Conn.Open Application("DSN"), Application("DSN_USERNAME"), Application("DSN_PASSWORD")
我在网上搜索过,无法找到问题的明确答案 - 如何判断连接是否为ODBC连接?
由于 萨姆