Wiki Home

Web Form Text Area To Memo

Namespace: VFP
The FoxPro ODBC driver won't pass any single argument that is longer than approximately 255 characters. The entire command can be longer, but each individual argument is limited.

This makes it a bit of a challenge to take sizable data from a form's Textarea and place it into a VFP table's Memo field.

It is possible to split the data up and insert the first 200 characters with the rest of the row and add the remaining text using Updates such as this ASP:

update_statement = "update mytable set bigtext=bigtext + " + mid(Request.form("commentbox"), 201, 400) +" where blah=blahdiblah"

Of course you'd probably want to write a routine that did the right number of updates for the amount of text entered.

Tom Cerul 9/8/4
It is an undocumented (AFAIK) feature of the ODBC SQL-Passthrough that VFP will parse named parameters in SQL statements, i.e.
lcBigText = Request.form("commentbox")
SQLExec("update mytable set bigtext = ?lcBigText where blah=blahdiblah")

This is an example of VFP code posting data to an ODBC data source, Tom. I don't write ASP code and don't know if this would work in your situation, but it sure seems a lot simpler than trying to break a string into pieces. You may want to see if that applies in your situation as well. -- Ted Roche
Category SPT
( Topic last updated: 2004.09.10 02:51:42 PM )