Michael Lester Posted March 26, 2006 Posted March 26, 2006 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? Thanks Mike Lester
Stumpii Posted March 27, 2006 Posted March 27, 2006 This may help: http://www.autoitscript.com/forum/index.ph...topic=20736&hl= 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.
billmez Posted March 27, 2006 Posted March 27, 2006 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? Thanks Mike Lester Basic stuff in this post should be a good start: http://www.autoitscript.com/forum/index.ph...topic=19597&hl= _SelectData() 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) $RS.Close $addfld.Close EndFunc
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now