Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Andy@modulusgroup.com
Starting Member
3 Posts |
Posted - 2004-07-14 : 14:48:17
|
| When running an update statement to a text column my entry of 11838 characters is cut off at 10000 characters, meaning that the acutal entry in the database is erroneous. This fails using both the web interface I designed and manual query execution in query analyzer, although query analyzer tells me that the execution was successful. Any help would be appreciated.Thanks,-Andrew BartelModulus, LLC |
|
|
Kristen
Test
22859 Posts |
Posted - 2004-07-14 : 15:03:42
|
| There are all sorts of things that can be a swine with Text columns. There is talk in the newgroups that it works OK if its the last column in the SELECT list, and if there is an R in the month and so on.Are you using the dreaded AppendChunk, or are you just doing a Dynamic SQL"UPDATE MyTable SET MyColumn=" & MyStringVariable & " WHERE MyKey = '" & MyKeyVariable & "'"type deal?Kristen |
 |
|
|
Andy@modulusgroup.com
Starting Member
3 Posts |
Posted - 2004-07-14 : 15:47:18
|
| I stay away from AppendChunk if possible, the exact query syntax is essentially what you described.UPDATE content SET text = 'blah.. 11k characters later.. blah' WHERE contentid = 1 |
 |
|
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2004-07-14 : 16:02:37
|
| are you handing situations where the input includes apostrophe's and all that? this is really dangerous stuff -- you should be using a stord procedure to update your data. a user can crash your server pretty easily if you don't protect against invalid characters or overruns.- Jeff |
 |
|
|
chacha
Starting Member
39 Posts |
Posted - 2004-07-14 : 16:52:33
|
| Have other inserts been truncated to 10000 characters as well? I dunno, maybe run this query and see what the run_value and config_value for the maximum size of a replicated text column are set to...exec sp_configure 'max text repl size' |
 |
|
|
Andy@modulusgroup.com
Starting Member
3 Posts |
Posted - 2004-07-14 : 17:40:11
|
| Thanks to all for your input, it was actually a problem with my script and a setting in my php.ini file. I was using a script I wrote to test whether or not the database entry was complete, and the setting I had in my .ini file truncated all text entries at 10k characters, making it look like there was a problem with sql rather than my script. So even though the select statement ran properly, it appeared that it did not, leading me to blame sql server. |
 |
|
|
chacha
Starting Member
39 Posts |
Posted - 2004-07-14 : 18:10:40
|
quote: This fails using both the web interface I designed and manual query execution in query analyzer, although query analyzer tells me that the execution was successful
But you said that the text was truncated to 10000 when you ran the query in query analyzer too??? Glad you fixed your problem. |
 |
|
|
|
|
|
|
|