Ok, so I have my code written to update, delete, and insert new records into my MS Access DB, using the oledbadapter and a dataset. The problem is, I cannot find out how to get the info that is returned by a select statement. E.G. "Select * from Products"
Heres the code im using now, but I dont know how to get what it returns. All help would be greatly appreciated.
VB Code:
Public Function SelectFrom(ByVal what As String, ByVal table As String, ByVal where As String) As DataSet ' This function does a custom select statement Try Dim query As String = "Select " & what & " from " & table & " where " & where & ";" Dim db As New OleDbDataAdapter(query, ConnectionString) ' Runs db.Fill(DataSet, "Products") Return DataSet db.Dispose() Catch e As Exception MsgBox(e.Message) End Try




Reply With Quote