VB connection with ms access
Closed
Kisa
-
Nov 9, 2009 at 05:11 AM
bytelogik Posts 8 Registration date Monday October 5, 2009 Status Member Last seen November 9, 2009 - Nov 9, 2009 at 03:27 PM
bytelogik Posts 8 Registration date Monday October 5, 2009 Status Member Last seen November 9, 2009 - Nov 9, 2009 at 03:27 PM
Related:
- VB connection with ms access
- Ms access download - Download - Databases
- How to access google usa - Guide
- F panel connection - Guide
- Attrib access denied ✓ - Hard Drive & SSD Forum
- Steam no connection - Guide
1 response
bytelogik
Posts
8
Registration date
Monday October 5, 2009
Status
Member
Last seen
November 9, 2009
12
Nov 9, 2009 at 03:27 PM
Nov 9, 2009 at 03:27 PM
Add DAO 3.6 Reference to your project
Dim dbDef As Database
Dim rsDef As Recordset
Set dbDef = DBEngine.OpenDatabase(YourDatabasePath", False, False) 'ex: your databasepath = "c:\something.mdb"
Set rsDef = dbDef.OpenRecordset("select * from yourtable") 'ex: yourtable name of table in the database you want to access
do while not rsDef.EOF
'read records
rsDef.MoveNext
loop
Set rsDef = Nothing
Set dbDef = Nothing
Dim dbDef As Database
Dim rsDef As Recordset
Set dbDef = DBEngine.OpenDatabase(YourDatabasePath", False, False) 'ex: your databasepath = "c:\something.mdb"
Set rsDef = dbDef.OpenRecordset("select * from yourtable") 'ex: yourtable name of table in the database you want to access
do while not rsDef.EOF
'read records
rsDef.MoveNext
loop
Set rsDef = Nothing
Set dbDef = Nothing