SQL/ASP and string with more than 255 chars

SQL/ASP and string with more than 255 chars

Post by Phil » Thu, 04 Feb 1999 04:00:00



Hello everybody,

Well, I made some web pages (.asp pages) to be able retrieve and store
text into a Visual Fox Pro Database (v.6.0).

 - The field in wich I put my text is a memo field (VFP field that can
contain different type of data with a dynamic size)
 - The text that I'm trying to put into this memo field is written using
a TEXTAREA (HTML) element
 - To access the database I use a SQL request written in VBasic

 - The code used is the following:

 <% set OBJdbConnection = server.createObject("adodb.connection")
       OBJdbConnection.open "DSN=ATRS2"

       SQLId = Request.Form("RepId")
       SQLStatus = Request.Form("RepStatus")
       SQLTitle = Request.Form("RepTitle")
       SQLUpdatingdate = Request.Form("RepUpdatingDate")

       Dim SQLReport

       SQLReport = Request.Form("RepReport")  ' Value of the TEXTAREA
(HTML) element

       SQLReport = Replace(SQLReport,"'","''")
       SQLReport = Replace(SQLReport,Chr(13),"<BR>")  ' substitute the
<CR>
       SQLReport = Replace(SQLReport,Chr(10),"<BR>")  ' substitute the
<LF>

       Dim SQLUpdate

       SQLUpdate = "UPDATE atrs_issue2 SET Description = ' "& SQLReport
&" ' where id =" & SQLId &";"

       set RSCustomerList = OBJdbConnection.execute(SQLUpdate)  '
Blocked if length of SQLUpdate > 255 char

 %>

My problem is simple:

 If the number of characters contained in the TEXTAREA element that I
 access with the var : SQLReport  exceed 255 my request is blocked by
the
 IIS server and the error message is (but it's possible to write more
than 255 char in the TEXTAREA):

 "
     Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

     [Microsoft][ODBC Visual FoxPro Driver]Command contains unrecognized
phrase/keyword.     ?
 "

 I think that maybe it's a problem related to the Server Variable
environment (IIS server) maybe there is a way to specify the amount of
the data transmitted during an OBJdbConnection.execute request.

Thanks very much, have a nice day and take care Phil Nembrini.

--
Phil Nembrini
Ascom Transmission AG - Broadnet Division / NAE
Schwarzenburgstrasse 73, CH-3014 Bern/Liebefeld, Switzerland

http://www.broadnet.ascom.ch
Phone: +41 31 999 2198
FAX:     +41 31 999 3057

 
 
 

1. SQL/ASP and string with more than 255 chars

Hello everybody,

Well, I made some web pages (.asp pages) to be able retrieve and store
text into a Visual Fox Pro Database (v.6.0).

 - The field in wich I put my text is a memo field (VFP field that can
contain different type of data with a dynamic size)
 - The text that I'm trying to put into this memo field is written using
a TEXTAREA (HTML) element
 - To access the database I use a SQL request written in VBasic

 - The code used is the following:

 <% set OBJdbConnection = server.createObject("adodb.connection")
       OBJdbConnection.open "DSN=ATRS2"

       SQLId = Request.Form("RepId")
       SQLStatus = Request.Form("RepStatus")
       SQLTitle = Request.Form("RepTitle")
       SQLUpdatingdate = Request.Form("RepUpdatingDate")

       Dim SQLReport

       SQLReport = Request.Form("RepReport")  ' Value of the TEXTAREA
(HTML) element

       SQLReport = Replace(SQLReport,"'","''")
       SQLReport = Replace(SQLReport,Chr(13),"<BR>")  ' substitute the
<CR>
       SQLReport = Replace(SQLReport,Chr(10),"<BR>")  ' substitute the
<LF>

       Dim SQLUpdate

       SQLUpdate = "UPDATE atrs_issue2 SET Description = ' "& SQLReport
&" ' where id =" & SQLId &";"

       set RSCustomerList = OBJdbConnection.execute(SQLUpdate)  '
Blocked if length of SQLUpdate > 255 char

 %>

My problem is simple:

 If the number of characters contained in the TEXTAREA element that I
 access with the var : SQLReport  exceed 255 my request is blocked by
the
 IIS server and the error message is (but it's possible to write more
than 255 char in the TEXTAREA):

 "
     Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

     [Microsoft][ODBC Visual FoxPro Driver]Command contains unrecognized
phrase/keyword.     ?
 "

 I think that maybe it's a problem related to the Server Variable
environment (IIS server) maybe there is a way to specify the amount of
the data transmitted during an OBJdbConnection.execute request.

Thanks very much, have a nice day and take care Phil Nembrini.

--
Phil Nembrini
Ascom Transmission AG - Broadnet Division / NAE
Schwarzenburgstrasse 73, CH-3014 Bern/Liebefeld, Switzerland

http://www.broadnet.ascom.ch
Phone: +41 31 999 2198
FAX:     +41 31 999 3057

2. Get the next free number of a column

3. why group by required for select max?

4. Crosstab Query Question for SQL Gurus

5. Extracting Data from a web page

6. SQL/ASP and string with more than 255 char

7. ASP and SQLServer Error for String longer than 255 chars

8. ASP page only gets 255 chars when the column is varchar 7000 - SQL 7.0

9. SQL setup binary, ado truncating strings at 255 chars

10. SQL strings getting cut off at 255 Chars.