主题:关于datareader
Dim cnn As New System.Data.OleDb.OleDbConnection
Dim cmd As New System.Data.OleDb.OleDbCommand
Dim sql As String
sql = "select * from yh where '" & TextBox1.Text & "' and pswd='" & TextBox2.Text & "' "
cnn.ConnectionString = Pro
cnn.Open()
cmd.CommandText = Sql
cmd.Connection = cnn
[color=800080] Dim Rd As New System.Data.OleDb.OleDbDataReader[/color]
Rd = cmd.ExecuteReader()
Me.TextBox3.Text = Rd("Zname")
Me.TextBox4.Text = Rd("name")
Me.TextBox5.Text = Rd("PSD")
Rd.Close()
cnn.Close()
怎么部是显示System.Data.OleDb.OleDbDataReader没有构造函数?关于使用datareader的读限数据,上面的程序正确吗?请指出。谢谢了
Dim cmd As New System.Data.OleDb.OleDbCommand
Dim sql As String
sql = "select * from yh where '" & TextBox1.Text & "' and pswd='" & TextBox2.Text & "' "
cnn.ConnectionString = Pro
cnn.Open()
cmd.CommandText = Sql
cmd.Connection = cnn
[color=800080] Dim Rd As New System.Data.OleDb.OleDbDataReader[/color]
Rd = cmd.ExecuteReader()
Me.TextBox3.Text = Rd("Zname")
Me.TextBox4.Text = Rd("name")
Me.TextBox5.Text = Rd("PSD")
Rd.Close()
cnn.Close()
怎么部是显示System.Data.OleDb.OleDbDataReader没有构造函数?关于使用datareader的读限数据,上面的程序正确吗?请指出。谢谢了