Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

So I guess this whole .net thing isn't just version 7 of VB...

Status
Not open for further replies.

conipto

MIS
Jan 31, 2005
1
US
Hi there,

I'm a hobbyist programmer with a fair bit of experience in the older VB5 and even older.. While much of this .net stuff is pretty similar to me, I just don't get how data access works. I am trying to do simple tasks like reading and writing to .mdb files, and coming up empty. Is there a good walkthrough somewhere for simple table access from vb.net?

Bill
 
this site is a handy reference for the connection string syntax


this is an example of using the dataadapter...

Dim conn As New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\temp\nwind.mdb;")
conn.Open()

Dim comm As New OleDb.OleDbCommand("Select * FROM Customers", conn)
Dim da As New OleDb.OleDbDataAdapter(comm)

Dim table As New DataTable
da.Fill(table)

DataGrid1.DataSource = table

there's also decent article on the subject here...

 
Just search for topics such as ADO.Net on MDSN.Microsoft.com. There are tons of examples. There's also tons of books out there.
 
I would try adding a new item and select dataform. Follow the wizard and hook it up to a access data table. Its a good way to see working code without much work.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top