请问连接access的代码怎么写?
请问连接access的代码怎么写?
一个Connect和
一个Command和
一个Recordset和
一个DataSource和
一个DataSet,,,,
谢谢,我就这么多分了,,,,
[解决办法]
Dim sql As String
sql = "select * from books where book_name= " & " ' " & shumingstr & " ' "
Dim conn As OleDb.OleDbConnection
conn = New OleDb.OleDbConnection
Dim ds As DataSet = New DataSet
conn.ConnectionString = "provider=microsoft.jet.oledb.4.0;data source=.\TSGL.mdb "
Dim ada As OleDbDataAdapter = New OleDbDataAdapter(sql, conn)
ada.Fill(ds, "books ")
conn.Open()
datagrid1.datasoure=ds.table( "book ")