Text field is empty

  • Thread starter Thread starter jtvc
  • Start date Start date
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
 
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)
 
Yo're right, Elton. I didn't knew about the EM limitation. Once I used
the QA the information appeared. Thanks!
 
Back
Top