aggeliki23
Programmer
hello i am new here and i need your help
i am a new programmer and i programming in visual basic
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?
i am a new programmer and i programming in visual basic
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?