Ask a Question related to ASP Database, Design and Development.
-
Bob Barrows #1
Re: Saving long text in a memo field
Sajid wrote:
I've never run across this situation. My first suggestion would be to switch> Hi All
>
> I am developing a website using asp and access. I have some pages in
> which user can type very long text in a textarea and submit it. The
> long text is saved in a memo field. When text is small (e.g. 1000
> characters), it is saved (as well modified) successfully. But when I
> try to submit very long data (e.g. 4000 characters), it generates
> following error:
>
> [Microsoft][ODBC Microsoft Access Driver] Could not save; currently
> locked by user 'admin' on machine 'ABC'.
>
> and the error number is 2147467259.
>
> If someone could help in this regard. I'll be very thankful.
>
> Regards
> Sajid
from ODBC to OLEDB. Here is a sample connection string you could use (other
examples can be found at [url]www.able-consulting.com/ado_conn.htm):[/url]
oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=c:\somepath\myDb.mdb;"
I just ran a test with this code:
<%
dim cn,sMemo, sSQL
set cn=server.createobject("adodb.connection")
cn.Open "provider=microsoft.jet.oledb.4.0;data source=" & _
server.MapPath("db7.mdb")
sMemo=string(4000,"x")
sSQL="INSERT INTO TestTable(memofield) VALUES ('" & _
sMemo & "')"
cn.Execute sSQL,,129
%>
The 4000 x's were inserted with no problem. I then tried an update:
sMemo=string(4000,"y")
sSQL="UPDATE TestTable SET memofield='" & sMemo & "'"
cn.Execute sSQL,,129
Please try my suggestion of switching to OLEDB. If that does not solve your
problem, post some code to show me how to reproduce the problem.
Bob Barrows
PS. Since this is an ASP and database question, I've cp'ed and set followups
to microsoft.public.inetserver.asp.db
--
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 Guest
-
Query error saving to Memo field ...
<cfqueryparam cfsqltype="CF_SQL_LONGVARCHAR" value="#arguments.details.CONTENT#"> let me save properly to Memo field unless "CONTENT" length is more... -
CFMX 7 SQL TEXT FIELD Long Text Retrieval
I have CFMX 7 Developer Edition on my development box and CFMX 7 Standard on a production box. I have a text field on my SQL server which contains... -
Postgresql Text field / Visual FoxPro Memo and ODBC
On Wed, 2005-01-12 at 14:59, MargaretGillon@chromalloy.com wrote: Postgresql doesn't support updatable cursors. ---------------------------(end... -
Content from a memo field: converting the rich text into plain text
Hi folks, I have an Access 2000 db with a memo field. Into the memo field I put text with bold attributes, URL etc etc What I need to to is... -
losing text in memo field when double-spacing
Hi, I'm working in Access 2000 with a db that has a lot of text. When I change the line spacing to .1" (properties box, format tab) in memo... -
Bob Barrows #2
Re: Saving long text in a memo field
Sajid wrote:
I see you have not taken my suggestion to try the native Jet OLEDB provider> ************************
> Database Manupulation Functions
> ************************
>
> sub openDb()
> if varType(connTemp)=0 or varType(connTemp)=1 then
>
> ' create the connection
> set connTemp = server.createObject("adodb.connection")
>
> connTemp.Open Application("myDSN")
>
>\
instead of the obsolete ODBC DSN. Please give that a try.
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 Guest



Reply With Quote

