Click to See Complete Forum and Search --> : I cann't access absolutepostion property of recordset


Aldair
December 18th, 2003, 09:50 PM
In my asp web page
I cann't access absolutepostion property of
a recordset

objConn.Open("Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("db1.mdb"))

Set objConn = Server.CreateObject("ADODB.Connection")
Set RS= Server.CreateObject("ADODB.Recordset")

RS.CursorLocation=2 'adUseServer ( adUseClient=3)
RS.Open "select * from MyRecordSet",objConn,3,3
n=RS.AbsolutPosition
<here n value will get anly -1)



Pease advice how to solve

buser
December 19th, 2003, 01:15 AM
If the provider does not support the IRowsetScroll interface, the property is set to adPOSUnknown. See the documentation for your provider to determine whether it supports IRowsetScroll.
?adPOSUnknown = -1

buser
December 19th, 2003, 01:25 AM
try to OLE DB Connection String
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=physical path to .mdb file

Aldair
December 19th, 2003, 06:52 AM
Thanks buser for your suggestion.
I used

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=physical path to .mdb file


It worked for me.
Thanks again.
:)