absolutePosition value

Joined
Feb 12, 2007
Messages
2
Reaction score
0
i declare an adodb recordset in my code like this
dim rs as adodb.recordset

in form load:
i open the connection, i open the sql query with the rs object
Set rs = New ADODB.Recordset
rs.Open sql, conn, adOpenStatic, adLockOptimistic
i set the data source in textboxes and datafields with the names of the fields of the table i use in sql query to appear the records in them
and then i call rs.movefirst
when i appear the rs.absoluteposition with statement msgbox rs.absoluteposition i see that the value is =-1.
Why does it happens? Why value of rs.absolutePosition is -1?
I think that the -1 value is if the current record is bof
I tried this
if rs.bof=false then
msgbox rs.absoluteposition
end if
but i am still getting -1 value. I have confused, i don't know the value that must have rs.absoluteposition, is 0 or 1? And what can i do having my
rs.absolutePosition the properly value? May anyone help please?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top