I am useing teh SQL that is on my SBS 2003 box, so I magine it is SQL 2000
As far as needing to use absolute page, it is teh only item I know how to
use. I am not a web creater full time. I just support what we have and
create new when needed. IF there is a better way, I am more than happy to
do it that way.
Here is the code you requested.:
objConn.Open "Provider=SQLOLEDB.1;Password=xxxxx;Persist Security
Info=True;User ID=xxxx;Initial Catalog=TTSI;Data Source=MAILSVR"
if txtPONumber = "" then
strFBSQL = "SELECT * FROM TTSITracing WHERE " & strWhichCompany & " = "
& strUserID & " AND (" & tPickupDelivery & ">= " & "'" & eDate & "'" & " AND
" & tPickupDelivery & "<= " & "'" & sDate & "'" & ") ORDER BY " &
strSortOrder & " ;"
else
strFBSQL = "SELECT * FROM TTSITracing WHERE " & strWhichCompany & " = "
& strUserID & " AND ConsigneeRefNum like '%" & txtPONumber & "%' AND (" &
tPickupDelivery & ">= " & "'" & eDate & "'" & " AND " & tPickupDelivery &
"<= " & "'" & sDate & "'" & ") ORDER BY " & strSortOrder & " ;"
end if
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~
rsFBills.Open strFBSQL, objConn, 3,3
If not (rsFBills.BOF and rsFBills.EOF) then
' response.write "Hello" '
rsFBills.PageSize = 20
intPageCount = rsFBills.PageCount
If Request("PageNo")= "" or Request("PageNo") =0 or Request("PageNo") < 1
Then
intCurrentPage = 1
Else
intCurrentPage = Request("PageNo")
' To define last page in case user enters a larger page count
If CInt(Request("PageNo")) > intPageCount Then
intCurrentPage = intPageCount
End If
End If
response.write rsFBills.cursortype
rsFBills.absolutepage = intCurrentPage
"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote in message
news:uR**************@TK2MSFTNGP05.phx.gbl...
Well, if you look that up at
http://msdn.microsoft.com/library/en...ortypeenum.asp,
you will see that 0 translates to adOpenForwardOnly, which according to
the
chart on this page:
http://msdn.microsoft.com/library/en...cursortype.asp,
does
not support adBookmark (bookmarks). So this explains why absolutepage is
not
working. What now needs to be explained is why you are getting a
forward-only cursor, which I suspect is not intended (and which the same
exact code on your NT4 box was not returning). In order to answer that
question, YOU need to provide the answer to ALL the other questions I
asked
in my previous reply. (why does it feel like I'm pulling teeth? I asked 4
questions in my previous post and you answered one of them. Don't you want
to get this resolved today? :-) )
In addition, you will need to show the code used to open your connection
(including the connection string - you can replace the username and
password
with xxxx if you aren't using integrated authentication to connect) and
the
code used to create and open the recordset. If you're dealing with a lot
of
user inputs and a long sql statement, you can snip that out because it
probably isn't relevant.
Bob Barrows
Johnfli wrote: The response.write on teh cursortype came out as 0
"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl... Johnfli wrote:
ADODB.Recordset error '800a0cb3'
Current Recordset does not support bookmarks. This may be a
limitation of the provider or of the selected cursortype.
I am moving my webserver from NT4 using SQL to win2003 using SQL
2003
No such thing. Do you mean SQL 2000 or SQL 2005?
I get the above error when my asp page does teh line:
Rs.absolutepage = intCurrentPage
I tested teh value of intCurrent page and teh value is 1.
Any ideas? The .asp Page works perfectly fine on teh old machine.
Well, you probably have a different version of ADO (MDAC) on the new
machine whose OLE DB provider is more strict about the cursor types
that support bookmarks.
1. Do you really need to support AbsolutePage? If you are using a
recordset for paging, you may want to consider one of the more
efficient methods talked about in this article:
http://www.aspfaq.com/show.asp?id=2120
2. If you are really married to utilizing the absolutepage property
this way, we are going to need more information:
-what provder are you using?
-what cursortype are you requesting for the recordset?
-what cursortype are you actually getting? (do a response.write
rs.cursortype after opening the recordset)
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so
I don't check it very often. If you must reply off-line, then remove
the "NO SPAM"
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.