Simple problem - No obvious solution

Results 1 to 3 of 3

Thread: Simple problem - No obvious solution

  1. #1
    Join Date
    Dec 1969

    Default Simple problem - No obvious solution

    Hi,<BR><BR>I&#039m in the process of converting a message board to SQL Server.<BR><BR>The problem I&#039m having is that if you put too much data into the message field on the form (around 100kb) I get a stact overflow.<BR><BR>The ideal solution is not to get this, but looking at the code it&#039s actually overflowing the variable used to store the text, long before getting to the database.<BR><BR>If don&#039t use a variable, just the data from the form post I actually overflow the command object I&#039m using: This is the line I&#039m using for the command object:<BR><BR>objCommand.Parameters.Append objCommand.CreateParameter("MessageBody",adLongVar Char,adParamInput,,Request.Form("MessageBody"))<BR ><BR>Again, it looks like this isn&#039t a problem with the SQL Server. I certainly hope a text field can hold more than 100kbs of data.<BR><BR>If this is a limitation of ASP then how can I elergantly trap this error?<BR><BR>Thanks for your help.<BR>Tom<BR><BR>Interestingly, this message board also does the same!

  2. #2
    David Mann Guest

    Default How to access data fields of type "long" or "blob"

    You&#039re right; it&#039s ASP having the problem. Here&#039s the solution:<BR><BR>Dim GetBlobVar<BR><BR>.....<BR><BR>&#039assuming recordset is made, and assuming RS(0) is the one with the large data field...<BR><BR>GetBlobVar = RS(0).getChunk(100000) &#039This will get 100k of data, just up the number for more. =)<BR><BR>I THINK that&#039s the right way, as I haven&#039t used it in a long while. It should work, though. Let me know how it goes!<BR><BR>Sincerely,<BR> --David<BR><BR>

  3. #3
    Join Date
    Dec 1969

    Default RE: How to access data fields of type

    Thanks for the help. However,<BR><BR>I don&#039t have any recordset objects. I&#039m trying to INSERT data using an SQL server stored procedure by executing a command object.<BR><BR>Cheers

Posting Permissions

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