Print Page | Close Window

HELP needed urgently!

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=21848
Printed Date: 29 March 2026 at 7:40pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: HELP needed urgently!
Posted By: IvekS
Subject: HELP needed urgently!
Date 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



Replies:
Posted By: michael
Date 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.

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net