Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - HELP needed urgently!
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

HELP needed urgently!

 Post Reply Post Reply
Author
IvekS View Drop Down
Newbie
Newbie


Joined: 24 October 2006
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote IvekS Quote  Post ReplyReply Direct Link To This Post Topic: HELP needed urgently!
    Posted: 06 November 2006 at 12:57pm
Hi everyone.
 
By coding the page, I get the error I cannot resolve by myself and asking you're help with it.
 
So, I try to list the data from my database, and everything work well.
Then I try to limit the shown reselts in my asp page to 195 chrs and I get the error "ADODB.Recordset (0x800A0CB3)
Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype." if enabled the LockType.
If my LockType is disabled this script is changing all fields in my database to 195 chrs.
 
I only need to show the first 195 chrs from my database on the page, without changing anything in my database.
 
Can anyone help?
 
Here is a complete code handling the function's.
 
<%
strSQL = "SELECT Products.* FROM Products"
 strSQL = strSQL & " ORDER By Name ASC;"
Do While not rsEcc.EOF
 
' Show only 195 chrs in decription
' Doesn't work because it changes the lenght of text in database to 195 chrs when LockType is set to 3
' Without the LockType it returns a error: ADODB.Recordset (0x800A0CB3)
Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype.

 rsEcc("Description") = left(rsEcc("Description"),195)
 if mid(rsEcc("Description"),195) <> "" then
 rsEcc("Description") = left(rsEcc("Description"),195) & "..."
 end if
 
' from now everything is working fine
Response.Write ("<strong><a href=""product.asp?ID=" & rsEcc("ID") & """>")
 Response.Write (rsEcc("Name"))
 Response.Write ("</a></strong>")
 Response.Write ("<br>")
 Response.Write (rsEcc("Description"))
 Response.Write ("<br><br>")
 rsEcc.MoveNext
Loop
rsEcc.Close
Set rsEcc = Nothing
%>
 
Regards to everyone
Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post Posted: 06 November 2006 at 2:08pm
 rsEcc("Description") = left(rsEcc("Description"),195)
is trying to update the recordset which you can't do like that. set the recordset to a variable and then tinker with the length.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.