Interfacing VB.net with Access 2003

  • Thread starter Thread starter David
  • Start date Start date
D

David

Hi, I'm looking for advice on where to start with interfacing VB 2005 with
Access 2003. For starters I would like to be able to add data to tables and
retrieve queries from tables.

Thanks,

David
 
You'll need an OLEDB.OLEDBConnection object and it's connection string
property set up to "Provider=Microsoft.JET.Oledb.4.0;Data Source=" &
pathToTheAccessDB.

Then you can create OLEDB.OLEDBCommand objects to do the querying.
 
Mr. Arnold said:
The example is using ordinal field position numbers, but you can give
field names as well, use Google and look it up.

http://visualbasic.about.com/od/learnvbnetandadonet/l/aa050303a.htm

You should get yourself a good ADO,Net book.

I'm going to take your advice and start studying ADO.NET.

After I posted my question on here I had found this page:
http://www.codeproject.com/vb/net/atcl.asp. There is a class library
available there that aids in data extraction and table maintenance. Does
this look worth using over ADO? I'm just wondering how much time I would
save by starting with this instead- I am hoping that using ADO to perform my
tasks (adding data to tables, retrieving queries from tables) won't take
more code than the example code on that page which demonstrates how to use
the class.

David
 
David said:
I'm going to take your advice and start studying ADO.NET.

After I posted my question on here I had found this page:
http://www.codeproject.com/vb/net/atcl.asp. There is a class library
available there that aids in data extraction and table maintenance. Does
this look worth using over ADO? I'm just wondering how much time I would
save by starting with this instead- I am hoping that using ADO to perform
my tasks (adding data to tables, retrieving queries from tables) won't
take more code than the example code on that page which demonstrates how
to use the class.

The Code Project is where I go to get good examples of how to do things in
VB or C#.net, with source code, so I can do cut and past. Why reinvent the
wheel I say? :)

But you still need a good ADO.NET book. There is more to ADO.NET than what's
being shown in the examples, which you might need to call upon. It's best to
know that it's there and not knowing at all.

The link may help you too.

http://msdn2.microsoft.com/en-us/library/ms971481.aspx
 
David,

Access has no database. It uses the Jet Engine or SQL Server. Those
Databases (although Jet is not real a complete database works with AdoNet.

To access Access (in fact the Jet Engine) you use OleDb where the Jet engine
is the default in showing samples.

You can look at our website which is filled with samples for that.

http://www.vb-tips.com/default.aspx

Cor
 
This example uses ADO .NET (by the way ADO is not what we are talking about
here).

Yes, you should ADO .NET if you are going to be working with data in .NET.
 
Well, not quite Cor. Technically, there is no such type of database called
Access. Access is just an IDE for a JET or SQL database, but Access does
have a database, just not one called Access.
 
Back
Top