Sign in to follow this  
Followers 0
johnynardi

Access Database problem

2 posts in this topic

Hallo guys!

iam have connected my Access database into my Autoit script

and iam haveing a problem reading the data after i made the Update statemen

its 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

Share this post


Link to post
Share on other sites



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 :-)

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  
Followers 0