Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recordset paging

Status
Not open for further replies.

Phonez

Technical User
Jan 16, 2002
58
GB
I have tried various methods from the web to try and do this but I cannot seem to be able to get it to work.

I am trying to use rs.absolutepage but it comes up with an error saying

Object or provider is not capable of performing requested operation.

It is starting to drive me crazy now so any help would be much appreciated
 
what database provider are you using? Access? I use SQL server, and it works, but make sure you use a cursor type that supports this property such as adOpenDynamic.
 
I am using access but I have looked at examples using access and they work fine. Could there be something that I am doing wrong?
 
if I try using that I get

Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

thanks

jon
 
The error you're getting now has nothing to do with your paging. You now have a problem with your sql statement. Sounds to me like you are trying to compare different datatypes with one another. Check to be sure everything you are passing to the table is of the same datatype.

Also, make sure that you are using a "adOpenKeyset" cursor type. This is what I have used to get paging to work.

Dave
 
The error is actually coming up with the rs.cursorlocation=aduseclient statement. The sql statement should be fine because it was working fine before I started trying to do the recordset paging.

Here is the code that I am using

Code:
query.cursorlocation=3
	query.CursorType=3 'staticrecordset
	query.PageSize=3
	
	set query = objconn.execute(strquery)

	Response.Write &quot;<table><tr>&quot;
 	for i=1 to query.PageCount
	Response.Write &quot;<td><ahref=support_form_1.asp?pg=&quot; & i & &quot;&search=&quot; & request(&quot;search&quot;) & &quot;>&quot; & i & &quot;</a></td>&quot;
	next
	Response.Write &quot;</tr></table><br>&quot; 

	if Request.QueryString(&quot;pg&quot;)=&quot;&quot; then
		query.AbsolutePage=1
		For i=1 to query.pagesize
		client_no = Cint(query(&quot;client_no&quot;))
		strquery1 =  &quot;select * from client where client_no = &quot; & client_no & &quot;&quot;
		set query1 = objconn.execute(strquery1)
table information
Code:
query.MoveNext
Next
.
.

Is there something wrong with anything in there. I have been trying and altering it all day but I cant get it working

Thanks,

Jon
 
Does not have any effect unfortunately. It cant be that difficult surely! I'll think of another way around it

Thanks anyway

Jon
 
Jon,

I just went back to some code that I wrote a looooong time ago and I was using the following:

I didn't set the cursor location at all, I left it server side.

I used a static cursor, as you have been.

I also used &quot;adLockOptimistic&quot; as the locking type.

If this doesn't work, I'm sorry.

Last ditch effort to be of some help.

:)

Dave
 
Check out this thread, you will find the whole code for recordset paging and it should work.

the 5th post in the thread:
Thread333-249800

regards,
durug
 
I have got it sorted now thanks.

It was a problem with the way I was opening my query but it works like a dream now
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top