August 21, 2006 at 8:56 am
Hello all.
I have a problem that makes no sense to me.
I have a field of text data type that i'm using to store free text from my application.
I had a user tell me that the field was truncating what he entered. I connect to SQL2005 and checked it using the SQL server manager and sure enough I get the error:
"No row was updated.
The data in row 2850 was not committed.
Error Source: .Net SqlClient Data Provider.
Error Message: String or binary data would be truncated.
The statement has been terminated.
Correct the errors and retry or press ESC to cancel the change(s)"
The field in question has 4096 characters including spaces.
from msdn books online:
text
Variable-length non-Unicode data with a maximum length of 2^31 - 1 (2,147,483,647) characters.
not quite there yet
any idea what is causing this?
many thanks
Will
August 21, 2006 at 2:37 pm
ok.. here is a small update.
I updated the field using the currently stored string copied twice into a text query.
(i.e. text size was twice the currently stored data)
and it worked fine.
going to do some research on PHP and the data being posted to the server..
ws
August 22, 2006 at 8:51 am
Found the problem...
the php mssql extension has some setting in the php.ini file.
had to extend the settings below
- mssql.textlimit = 145536 (max is 2 million something characters)
- mssql.textsize = 145536 (max is 2 million something characters)
hope this helps someone else out along the way..
ws
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply