how do i do it in VB .NET? Let's say i want to connect to the database, entries.mdb. What controls do I need to add?
Printable View
how do i do it in VB .NET? Let's say i want to connect to the database, entries.mdb. What controls do I need to add?
try to put a oledbdataadapter on your form, a wizard will guide you through the procedure
Depends what you want to do with your data.
Make sure you import the System.Data Namespace
If you just want to read the data, like a forward only cursor use a
oledbDataReader e.g.
Dim oConn As OleDb.OleDbConnection = New OleDb.OleDbConnection()
oConn.ConnectionString = ""
oConn.Open()
Dim oCmd As OleDb.OleDbCommand = New OleDb.OleDbCommand()
Dim oReader As OleDb.OleDbDataReader
oCmd.CommandText = "Select * from ...."
oReader = oCmd.ExecuteReader
While oReader.Read
oReader.Item("...")
End While
If you want to play with your data e.g. a disconnected recordset use a dataadaptor and dataset.
As above but
dim oDa as oledb.Dataadapter = new oledb.dataadapter()
dim oDs as oledb.dataset = new oledb.dataset()
oDa.selectcommand = oCmd
oDa.Fill(oDS, ".....")
Remeber to stick them in try catch finally
To save a new thread...and....get some answers that don't involve MS sales force, what new features are in what they are calling the "extended ado" down here. Sounds like marketing hype to me, but if they have got the .findfirst method in ADO would be more than happy.