473,396 Members | 2,059 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Text field is empty

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

Nov 19 '05 #1
2 1731
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
el********@hotmail.com

-----Original Message-----
I'm trying to insert a record on an sql server database table that hasamong others a text type field. The insert happens without errors andall the fields show the correct information except for the text fieldwhen the number of characters is larger than 900. In this case the textfield appears empty. If the text is less or equal to 900 charactersthey are inserted with no problem.

In this case have a stored procedure with several input variablesincluding the text one and a asp.net page with a command that is filledwith the several parameters necessary to run the procedure. One of themis 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

.

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

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Lakshmi Narayanan.r | last post by:
Hi..experts, I have a DSN connection for MySql with Asp. Used Text field to store the data. While displaying the data its gives the error,if field is empty. But works well if not empty. So pls...
2
by: leegold2 | last post by:
General DB questions, Why do we use null values? Why is it better than an empty field? What would be a real life situation were nulls are important to have? If I have a paragraph of text in a...
1
by: Thomas Matthews | last post by:
Hi, My goal is to extract a text field into a string type. The text field is from a buffer (array) of characters and delimited by white space or double quotes. *** I'm looking to perform this...
2
by: Ini | last post by:
Hi, I have a recordset containing names of photographs and descriptions of these photo's. For exempla: Photo: car01.jpg Description: Red Corvette
4
by: VivN | last post by:
I want to use an expression as the control source for a text box in a report (Access 2000). Whilst I have sucessfully used these simple ones =TimeToSingle(TotalHours(,))...
13
by: j_ruez | last post by:
I am trying to learn the best ways to do some things in c# When testing for an empty string, what is the best way to test it. For example, if I have a textbox named txtValue Should I use ...
1
by: serge calderara | last post by:
Dear all, I have a datagrid which is bind to a databse table. One field of that table contains a filename. What I ma trying to do is to display the content of a cell to be an icon when the...
2
by: Olveres | last post by:
Hi, I have managed to work out how to add new lines into a calculated text box. However in this text box some of the outcome fields are empty however when previewing the report it includes the...
3
by: kvnsmnsn | last post by:
I've written the following Javascript file that includes an input text field and an output text field, the latter of which is initialized to zero. Each time the user enters a number in the input...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.