Jump to content
Sign in to follow this  
Michael Lester

Writing Records To Microsoft Access With Autoit (using Dao)

Recommended Posts

“Give a man a script; you have helped him for today. Teach a man to script; and you will not have to hear him whine for help.”AutoIt4UE - Custom AutoIt toolbar and wordfile for UltraEdit/UEStudio users.AutoIt Graphical Debugger - A graphical debugger for AutoIt.SimMetrics COM Wrapper - Calculate string similarity.

Share this post

Link to post
Share on other sites

Does anyone have an example (as simple as possible) showing how to use DAO to extract data and add data to a table in MS Access?


Mike Lester

Basic stuff in this post should be a good start:



Func _SelectData($dbname = "C:\FullPathToDatabase.mdb", $tblname = "MyTable", $T = "*")
$addfld = ObjCreate("ADODB.Connection")
$addfld.Open("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & $dbname)
$RS =ObjCreate("ADODB.Recordset")
$RS.ActiveConnection = $addfld
$RS.Open ("Select " & $T & " From " & $tblname )

msgbox(0,"", "Name: " & $RS.Fields(0).Name & " - Value: " & $RS.Fields(0).Value & @CRLF & "Name: " & $RS.Fields(1).Name & " - Value: " & $RS.Fields(1).Value & @CRLF & "Name: " & $RS.Fields(2).Name & " - Value: " & $RS.Fields(2).Value)



Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...