Changing CursorLocation to adUseClient implicitly forces a static cursor.
--
Regards,
Eric Garza, MVP
Project manager
AMI GE
"shawn carter" <shawn...@netscape.net> wrote in message
news:1d15801c13727$9a876020$9ae62ecf@tkmsftngxa02...
The problem is because in most cases (and Oracle is one of them) with server
side cursor you can not get number of records. This is because the server
can not tell you the number of rows until they are all fetched.
So there are two ways to solve this. One way is to stay with server side
cursor and fetch all the rows - just call Move Last method of the recordset
(I suppose that you will cal MoveFirst immediately after this).
Other solution is to use ClientSide cursor which will fetch all the records
on the client side by default.
I hope this will help you
Goran
"shawn carter" <shawn...@netscape.net> wrote in message
news:1d15801c13727$9a876020$9ae62ecf@tkmsftngxa02...
when I try to fetch last then first I get an error
"Microsoft OLE DB Provider for Oracle (0x80040E24)
Rowset does not support fetching backward."
Is this a driver problem? Any Information would be great
Thanks
Shawn
set cn = server.CreateObject("ADODB.Connection")
cn.Open session("ORCA_ConnectionString")
set rs = server.CreateObject("ADODB.Recordset")
rs.Open sSearchSql,cn,adOpenStatic
if rs.BOF and rs.EOF then
' records search again
%>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio
6.0">
</HEAD>
<BODY>
<B>NO RECORDS RETURNED</b>
<% else %>
<textarea rows= 10 cols=50 id=textarea1 name=textarea1><%
=sSearchSql%></textarea>
<FONT SIZE="+1">
RecordCount <B><%=rs.RecordCount %></B>
>.
>
set rs = server.CreateObject("ADODB.Recordset")
rs.CursorType = adOpenStatic
rs.Open sSearchSql,cn
or
set rs = server.CreateObject("ADODB.Recordset")
rs.CursorLocation = adUseClient
rs.Open sSearchSql,cn
--
Regards,
Eric Garza, MVP
Project manager
AMI GE
"Shawn Carter" <shawn....@netscape.net> wrote in message
news:1d62c01c137ab$56ea8570$9be62ecf@tkmsftngxa03...
Do you have the ado constants defined on your page or are you including
adovbs.inc? If not adOpenStatic, adUseClient, etc. are not defined.
Steve
"Shawn Carter" <shawn....@netscape.net> wrote in message
news:1d62c01c137ab$56ea8570$9be62ecf@tkmsftngxa03...
Thanks for the advice I included the adovbs.inc in the
page and it works like a charm now. Thanks again
Thanks
Shawn