paging problem

Discussion in 'ASP General' started by Savas Ates, Aug 28, 2004.

  1. Savas Ates

    Savas Ates Guest

    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
    Savas Ates, Aug 28, 2004
    #1
    1. Advertising

  2. Savas Ates wrote:
    > 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
    --
    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"
    Bob Barrows [MVP], Aug 28, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Hajime Kusakabe

    DataGrid - sorting/paging problem

    Hajime Kusakabe, Jul 30, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    470
    Saravana
    Jul 31, 2003
  2. joedivec

    Paging Problem .NET

    joedivec, Aug 18, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    337
    joedivec
    Aug 18, 2003
  3. =?Utf-8?B?UGF0cmljay5PLklnZQ==?=

    DataSet paging vs Datareader paging

    =?Utf-8?B?UGF0cmljay5PLklnZQ==?=, Oct 8, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    10,644
    Scott Allen
    Oct 8, 2004
  4. wh1974
    Replies:
    0
    Views:
    2,404
    wh1974
    Jan 12, 2005
  5. Red
    Replies:
    1
    Views:
    693
Loading...

Share This Page