Text field is empty

J

jtvc

I'm trying to insert a record on an sql server database table that has
among others a text type field. The insert happens without errors and
all the fields show the correct information except for the text field
when the number of characters is larger than 900. In this case the text
field appears empty. If the text is less or equal to 900 characters
they are inserted with no problem.

In this case have a stored procedure with several input variables
including the text one and a asp.net page with a command that is filled
with the several parameters necessary to run the procedure. One of them
is the text parameter that is defined as follows:

insertcommand.Parameters.Add(New SqlParameter("@texto", SqlDbType.Text,
2147483647))
insertcommand.Parameters("@texto").Value = texto.Text
Does someone knows what is causing this problem ?

Thanks
 
E

EltonWang

Hi,

Why do you think it's empty?
Normally, when you use SQL Server Enterprise Manager to
open a table with text field, it shows actual content when
it's <= 900 characters, but <Long Text> when it's > 900
characters. Actual content is in table. If you use Select
query in Query Analyzer, you can see the difference.

Hope it's helpful
Elton Wang
(e-mail address removed)
 
J

jtvc

Yo're right, Elton. I didn't knew about the EM limitation. Once I used
the QA the information appeared. Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top