菜鸟的疑问
Dim rs As New ADODB.RecordsetDim sql As String
Dim cn As New ADODB.Connection
[u] rs.Open(sql, cn, 3, 2)[/u]
这里的open 方法怎么理解阿 --------------------编程问答-------------------- 看看ado.net先
现在不用Recordset --------------------编程问答-------------------- Dim sql As String = "..." 详细数据库信息,去看书吧
Dim cn As New Connection(sql)
cn.open()
....
cn.close() --------------------编程问答-------------------- 你说得我不懂,但是我一般是这么用的
Dim cn As New ADODB.Connection
Dim rs As ADODB.Recordset
Dim cmd As New ADODB.Command
cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\student.mdb"
cn.Open()
cmd.ActiveConnection = cn
cmd.CommandText = "insert into userID values(*****)" '这里可以接受所有的sql语句
rs = cmd.Execute
'如果需要察看结果
'If rs.EOF Then
' Return
'End If
'rs.MoveFirst()
'While rs.EOF = False
' MsgBox(rs.Fields(0).Value)
' rs.MoveNext()
'End While
补充:.NET技术 , VB.NET