Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > paging problem

Reply
Thread Tools

paging problem

 
 
Savas Ates
Guest
Posts: n/a
 
      08-28-2004
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='',@us ergender='',@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


 
Reply With Quote
 
 
 
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      08-28-2004
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='',@us ergender='',@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/experime...dsetpaging.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"


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Combining numeric mode paging and nextPreview paging in datagrid Red ASP .Net 1 03-12-2005 11:41 PM
datagrid paging - customising paging style wh1974 ASP .Net 0 01-12-2005 03:48 PM
DataSet paging vs Datareader paging =?Utf-8?B?UGF0cmljay5PLklnZQ==?= ASP .Net 1 10-08-2004 02:13 PM
Paging Dr. Who, Paging Dr. Who... Father_Sicko@TheOrphanage.com Computer Security 1 07-02-2004 08:59 PM
DataGrid - sorting/paging problem Hajime Kusakabe ASP .Net 2 07-31-2003 05:18 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57