paging problem

S

Savas Ates

Current Recordset does not support updating. This may be a limitation of the
provider, or of the selected locktype.

my connection string

Set baglantim=Server.Createobject("ADODB.Connection")
Outpost="PROVIDER=SQLOledb;Initial Catalog=friends;User Id=sa
;password=;Data Source=localhost" (it is oledb)

im using stored procedure to make a user search in asp what is my fault?
error line absolute page...


xx="exec st_usersearch
@email='',@firstname='',@surname='',@citytr='',@usergender='',@onlinestatus=
''"

Sayfalanacak_Kayit=5

If Request.QueryString("Sayfa") = "" Then
Gosterilen_Sayfa = 1
Else
Gosterilen_Sayfa = CInt(Request.QueryString("Sayfa"))
End If



set rs=server.CreateObject("adodb.recordset")

rs.pagesize=Sayfalanacak_Kayit

rs.open xx,baglantim,1,3


If Gosterilen_Sayfa > Toplam_Sayfa Then Gosterilen_Sayfa = Toplam_Sayfa
If Gosterilen_Sayfa < 1 Then Gosterilen_Sayfa = 1

rs.AbsolutePage = Gosterilen_Sayfa
 
B

Bob Barrows [MVP]

Savas said:
Current Recordset does not support updating. This may be a limitation
of the provider, or of the selected locktype.

my connection string

Set baglantim=Server.Createobject("ADODB.Connection")
Outpost="PROVIDER=SQLOledb;Initial Catalog=friends;User Id=sa


It is EXTREMELY bad and insecure programming practice to use the sa account
in your applications. The sa account can do anything in your system (not
just in the database). It should be used ONLY for administration by the
database administrator. Create a new login with only the permissions needed
to perform the tasks required by your application and use that account
instead of the sa account.

Also, from the looks of it, your sa account may have a blank password*. This
is also a bad idea: several internet worms have targeted sql servers with
password-less sa accounts. If your sa account has no password, and you value
your network's security, you should drop whatever you are doing and assign
the account a secure password.

* unless you just left it out, which would be a good idea. There is nothing
worse than broadcasting your sa password to the internet. A better way to
obscure the password without giving the empression it was blank would have
been to use xxxx
;password=;Data Source=localhost" (it is oledb)

im using stored procedure to make a user search in asp what is my
fault? error line absolute page...


xx="exec st_usersearch
@email='',@firstname='',@surname='',@citytr='',@usergender='',@onlinestatus=
''"

Sayfalanacak_Kayit=5

If Request.QueryString("Sayfa") = "" Then
Gosterilen_Sayfa = 1
Else
Gosterilen_Sayfa = CInt(Request.QueryString("Sayfa"))
End If



set rs=server.CreateObject("adodb.recordset")

Add this line:
rs.CursorLocation = 3 'adUseClient
If Gosterilen_Sayfa > Toplam_Sayfa Then Gosterilen_Sayfa =
Toplam_Sayfa
If Gosterilen_Sayfa < 1 Then Gosterilen_Sayfa = 1

rs.AbsolutePage = Gosterilen_Sayfa

The AbsolutePage property needed to be set BEFORE the recordset was opened.


The recordset can be opened using the following simple statement (no need
for the dynamic sql statement shown above):

baglantim.st_usersearch '','','','','','', rs


Here are some links to alternative paging techniques:
http://www.aspfaq.com/show.asp?id=2120
http://www.aspfaq.com/show.asp?id=2352
http://www.adopenstatic.com/experiments/recordsetpaging.asp

Bob Barrows
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,188
Latest member
Crypto TaxSoftware

Latest Threads

Top