当前位置: 代码迷 >> VB Dotnet >> 如何把access中select的值在textbox中显示
  详细解决方案

如何把access中select的值在textbox中显示

热度:65   发布时间:2016-04-25 02:17:42.0
怎么把access中select的值在textbox中显示?

知道其中name是1,查询对应xuehao
总之就是把下面这个补全,能查出来就行,越简单越好,thanks       
 Dim conn As New OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=test.mdb")
        conn.Open()
        Dim a As String = " select xuehao from 表1 where name=1"
        textbox1.Text = a
        conn.Close()
------解决方案--------------------
Dim a As String = " select xuehao from 表1 where name=1"
Dim cmd As New OleDbCommand(conn, a)
textbox1.Text = cmd.ExecuteScalar().ToString()
------解决方案--------------------
引用:
Dim cmd As New OleDbCommand(a,conn)吧...

嗯,写反了。

name='1'"
看看
------解决方案--------------------
多个用DataAdapter.Fill(dataSet),然后循环。
  相关解决方案