Hi Rod,
Thanks for posting in the community! My name is Steven, and I'll be
assisting you on this issue.
From your description, you want to let user input large paragraphs of text
and then stored into SQLServer
DataBase. Also, you'd like to retrieve the data out later and display in a
certain ASP.NET web page, yes?
If there is anything I misunderstood, please feel free to let me know.
As for this problem, here is my suggestions on it:
First , about the data type use to store the file content. I think the
text/ntext data type is the proper one since text/ntext type are particular
designed for store large amount of text information. It is highly optimised
dependent on the actual data's size.
If you use char/varchar, you need to definitly specify the size which'll
cause the waste of the space.
As for the proper way to store the text content from web page into DataBase
and also retrieve it out and display, I think you may use the DataReader
Component in ADO.NET as Hermit suggested. The DataReader can help execute a
certain insert or query statement. Then you just pass the text content as
the input parameter of the insert statement and when retrieving it out, you
just query the certain text/ntext type column and output it to a certain
label on the ASP.NET web page. Do you think so?
In addtion, instead of using text type, you could also first convert the
text content into byte arrays and then store it as binary large object
(BLOB) data to Microsoft SQL Server. Just like store other binary datas
such as images or rich documents...
Here is a KB article on: #HOW TO: Read and Write BLOB Data by Using ADO.NET
Through ASP.NET
http://support.microsoft.com/?id=326502
You may have a view to see whether it helps you.
Further more, I 've also searched some kb articles which have discussed on
some know issues or limitations on using Text/ntext type as input or output
param of store procedure with ADO.NET, you may also have a check to see
whether they'll help you:
#PRB: Stored Procedure with Text (BLOB) Input Returns Null Output
http://support.microsoft.com/?id=178445
#PRB: Text Output Parameter Empty with Unicode Build
http://support.microsoft.com/?id=216196
Please consider the above suggestions. If you have any questions, please
feel free to post here.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)