HOW TO CONNECT ADODB.connection in VB?
I need to coonect an access file in my visual basic project. HOW TO CONNECT ADODB.connection in VB?
Status:
Open Feb 07, 2009 - 10:29 PM
visual basic
2answers
Answers
May 01, 2009 - 09:10 AM
Hi,
say your access file name is myaccess.mdb,
You will access it in such a way:
Set rec = New ADODB.Recordset
Set conn = New ADODB.Connection
connstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & "myaccess.mdb" & ";Persist Security Info=False"
conn.Open (connstr), , , 0
ensure the path to your access file is correct, my sample above will look the access file in the same directory as your vb.
May 23, 2009 - 12:46 PM
The question looks to be abandoned by the user who asked it. If no action is taken within 2 days, a Quomon Moderator will consider closing the question and distributing the points.
The Quomon Team
Answer this question
Share Your Own Experience & Expertise
We look to ensure that every question is answered by the best people with relevant expertise and experience, the best answers include multiple perspectives. Do you have relevant expertise or experience to contribute your answer to any of these commonly asked questions?
Add New Comment