How do I pass long text into a stored procedure?

Results 1 to 2 of 2

Thread: How do I pass long text into a stored procedure?

  1. #1
    Josh Nelson Guest

    Default How do I pass long text into a stored procedure?

    Can anyone provide me with some insight as to how to do the following (an example other than the Microsoft help files would be appreciated):<BR><BR>I want to pass a large amount of text from an ASP page and append it into my parameters collection and pass it into a stored procedure, which will then insert the data into the DB. I think I need to use the AppendChunk method, but I am still a little confused how to use it, even after looking at Microsoft&#039s help files.<BR><BR>Here is what I currently have:<BR><BR>My stored procedure input parameter is typed as "text"<BR>My variable "sComment" contains text greater than 255 characters.<BR><BR>I have tried: cmd.parameters("@comment").value = sComment<BR>I have also tried the following but are unsure of what would go in the "XX" places (type and length properies):<BR> set prm = cmd.CreateParameter("@comment", XX, 1, XX, sComment)<BR> cmd.Parameters.Append prm<BR><BR>Can anyone help me out? Shed a little light on my ignorance? I appreciate any help.<BR><BR>Thanks,<BR><BR>Josh<BR>

  2. #2
    Nathen Grass Guest

    Default RE: How do I pass long text into a stored procedur

    I had to overcome the same problem a little while back on one of my projects. Try this:<BR><BR>set prm = cmd.CreateParameter("@comment", adVarChar, 1, len(sComment)+1, sComment)<BR><BR>Replace adVarChar with 200 if you&#039re not using the adovbs.inc file.<BR><BR>

Posting Permissions

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