Connect to MS Access DB

Share this post
FaceBook  Twitter  Mixx.mn     

Connection string to MS access, use following code:
Steps:

1) Create an ADODB connection  with provider as "microsoft.jet.oledb.4.0"

2) Open Access database

Code:
'Connect to MS Access DB
'==============================================
Function Create_AccessDB_Connection(AccessDBLocation)
'1) Create an ADODB connection  with provider as "microsoft.jet.oledb.4.0"'
set AXScon= CreateObject( "ADODB.Connection")
AXScon.provider="microsoft.jet.oledb.4.0"
'2) Open Access database'
AXScon.open AccessDBLocation
End Function