vb.net查询数据库并返回查询值??急,在线等!
cmd1.CommandText = "select stu_name from stuclass where stu_id='" & number.Text & "'"
Try
conn.Open()
Dim reader1 As IDataReader
reader1 = cmd1.ExecuteReader()
Dim pp As String = reader1.Read()
IF realname.Text = pp then
也就是说我现在要把cmd1.CommandText查询出来的stu_name 和realname.Text 控件输入值比较!!
怎么弄啊??
------解决方案--------------------
reader1.item(1)= realname.text
PS 看看LINQ如何呢?