johnynardi Posted April 19, 2012 Share Posted April 19, 2012 Hallo guys!iam have connected my Access database into my Autoit scriptand iam haveing a problem reading the data after i made the Update statemenits just shows me the last value iam assume its because the variable $adoRs stays after the Update on the last value.any idea how to move $adoRs to the first value?or maybe iam assuming wrong and its somthing else?thanks...!including code:$dbname = "D:\NoteMe.mdb" $tblname = "Dt_url" $query = "SELECT * FROM "& $tblname Local $title $adoCon = ObjCreate("ADODB.Connection") $adoCon.Open("Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & $dbname) $adoRs = ObjCreate ("ADODB.Recordset") $adoRs.CursorType = 1 $adoRs.LockType = 3 $adoRs.Open ($query, $adoCon) $adoRs.Addnew $adoRs.Fields("url").value = "www.b.co.il" $adoRs.Update while not $adoRs.EOF $title = $adoRs.Fields("url").value MsgBox(0,"testing",$title) $adoRs.MoveNext WEnd $adoCon.Close Link to comment Share on other sites More sharing options...
johnynardi Posted April 20, 2012 Author Share Posted April 20, 2012 Ok i fixed it by puting this $adoRs.MoveFirst And i have collected some of basic statement $adoRs.MoveFirst $adoRs.MoveLast $adoRs.MoveNext $adoRs.MovePrevious for very beggener like me :-) Link to comment Share on other sites More sharing options...
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