我继承了一个较旧的应用程序来管理。有人告诉我它建立了一个 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 连接?
谢谢山姆