Textarea not recorded in SQL DB

Results 1 to 2 of 2

Thread: Textarea not recorded in SQL DB

  1. #1
    Join Date
    Dec 1969

    Default Textarea not recorded in SQL DB

    Hi,<BR><BR>I want to fill out a SQL DB using a form with several input fields and a textarea.<BR>when submiting the form, it calls another asp file which insert the data into the SQL DB (DSN connection)<BR>Everything is fine except for "large" textarea submitted. It is not as large as Microsoft Q273482. This occurs already when the field has less than 1,000 characters.<BR><BR>The code used to write into the DB is :<BR><BR><BR>strconn="dsn=hotfix;UID=hf;PWD=hf"<BR >set ch3a = Request.Form("readme")<BR>set ch4 = request.form("path")<BR>set ch3 = Replace(ch3a,vbCr, "")<BR>set ch2 = ucase(request.form("txthfname"))<BR>set ch1 = request.form("txtctx")<BR>strSQL = "INSERT INTO hotfix(ctx, hfname, readme, path) Values(&#039;" & ch1 & "&#039;, &#039;" & ch2 & "&#039;, &#039;" & ch3 & "&#039;, &#039;" & ch4 & "&#039;)"<BR>response.write strSQL<BR>Set connection object <BR>set conn = server.createobject("adodb.connection")<BR>conn.op en strconn<BR>conn.execute(strSQL)<BR>conn.close<BR>s et conn = nothing<BR><BR>Thanks for your help !!<BR><BR>Frederic

  2. #2
    Join Date
    Dec 1969

    Default RE: Textarea not recorded in SQL DB

    1) What&#039;s the error message you get ?<BR><BR>2) What&#039;s the field type ? nvarchar ? char ? and what size ?<BR><BR>3) When making a Response.Write of your strSQL copy/paste it in Query Analyzer and execute it to see what is the error!<BR><BR><BR>Hope this helps!<BR><BR>Sincerely<BR>Vlince

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts