谁能给我讲下这段 vb代码啥意思.每句后面注释就好

2024-11-30 23:34:50
推荐回答(1个)
回答(1):

这是一段连接数据库的例子,最好了解下连接数据库德知识
Dim Recordset2 '定义结果集
Dim Recordset2_numRows'定义结果集数目
Set Recordset2 = Server.CreateObject("ADODB.Recordset")'获得服务对象
Recordset2.ActiveConnection = MM_abc_STRING'设置连接性质
Recordset2.Source = "SELECT * FROM acca WHERE m_id = " + Replace(Recordset2__MMColParam, "'", "''") + ""'数据来源,查询数据库的sql
Recordset2.CursorType = 0
Recordset2.CursorLocation = 2
Recordset2.LockType = 1
Recordset2.Open() '获得结果集
Recordset2_numRows = 0