By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,967 Members | 1,690 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,967 IT Pros & Developers. It's quick & easy.

Connecting MS access with VB

P: 1
How to connect MS access with VB
May 1 '07 #1
Share this Question
Share on Google+
5 Replies


Dököll
Expert 100+
P: 2,364
How to connect MS access with VB
Hello, prabakar!

You will need to do some reading:-)

Let me fetch the link.

Dököll
May 2 '07 #2

Dököll
Expert 100+
P: 2,364
How to connect MS access with VB
Here you go:

http://www.thescripts.com/forum/thread609151.html

Let me know how it turns out...
May 2 '07 #3

P: 27
well the code below gives a connection to the database

dim db as new ADODB.connection

set db =new ADODB.connection

db.open="PROVIDER=Microsoft.jet.OLeDB.3.51;Data Source=" & App.Path & "\xxx.mdb;" this is for an access database, pls give your tablename in the xxx
this makes a coinnection, however u need a Recordset to actually add,delete or edit records

for this
dim rs as new ADODB.recordset
set rs =new ADODB.recordset
rs.Open "SELECT * from tablename", db, adOpenDynamic, adLockOptimistic


this makes a perfect connection and now with a more detailed program u can add and delete records.
May 2 '07 #4

debasisdas
Expert 5K+
P: 8,127
Actually this is regarding the previous post

First of all select Microsoft ADO Object library.from Project---Reference

Next(regaring previous post)

In place of xxx instead of using tablename please use DATABASE name.

rest all is fine

and to open the recordset use TABLENAME in the SQL statment.
May 2 '07 #5

P: 27
hmm he was correct! sorry for the mistake! Do as he said!
thats it
May 3 '07 #6

Post your reply

Sign in to post your reply or Sign up for a free account.