Chinasmoker Posted November 19, 2007 Posted November 19, 2007 (edited) Maybe this topic 's no connection with au3,but if I cannt solve this trouble,that stand for my script 's no way to be continue,however,I must resolve it ,ok,talking my script,I use "addnew" to modify it ,but reture error the initial value is null below my script: CODE$dbname = (@DesktopDir & "\db1.mdb") $tblname = "T1" $fldname = "F1" $T = "*" _SelectData($dbname, $tblname, $fldname, $T) Func _SelectData($dbname, $tblname, $fldname, $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 ) $RS.AddNew $RS.Fields(0).Value = "12345"; $rs.Post msgbox(0,"",$RS.Fields(0).Name) msgbox(0,"",$RS.Fields(0).Value) $addfld.Close EndFunc Edited November 19, 2007 by Chinasmoker One is never too old to learn
martin Posted November 19, 2007 Posted November 19, 2007 Maybe this topic 's no connection with au3,but if I cannt solve this trouble,that stand for my script 's no way to be continue,however,I must resolve it ,ok,talking my script,I use "addnew" to modify it ,but reture errorthe initial value is nullbelow my script:CODE$dbname = (@DesktopDir & "\db1.mdb")$tblname = "T1"$fldname = "F1"$T = "*"_SelectData($dbname, $tblname, $fldname, $T)Func _SelectData($dbname, $tblname, $fldname, $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 )$RS.AddNew$RS.Fields(0).Value = "12345";$rs.Postmsgbox(0,"",$RS.Fields(0).Name)msgbox(0,"",$RS.Fields(0).Value)$addfld.CloseEndFuncMaybe this helps Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Chinasmoker Posted November 19, 2007 Author Posted November 19, 2007 Maybe this helpsThanks,just according that method,my script still error,and my script's running until go this line of "Addnew" One is never too old to learn
Chinasmoker Posted November 19, 2007 Author Posted November 19, 2007 -_-Help me One is never too old to learn
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