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