Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can change default row length? 2

Status
Not open for further replies.

Sapit

MIS
Jul 5, 2000
5
CA
While creating a table in MSSQL7 with varchar(1000) fields, I received a message that the total length of a row is 14678, that exceeds the default value of 8080. Hence, the rows of date that would ne longer than 8080, will NOT be inported into my table. Where in SQL7 can I find that default row length setting and how to change it to biggest possible value? Thanks a lot.
 
I don't think there is a way as it is inherent within the sqlserver engine as you cannot have one row of data occupying more than one 8KB data page (ie. 8080 bytes). The only way around it if you must have such large columns is to use TEXT fields instead of VARCHAR.<br><br>Chris Dukes
 
Thanks Chris, I tried to use TEXT datatype with fields up to 4000 positions and it works. However, MSSQL7 does not show large columns in full, if a SELECT Query is performed. I did: <br>Select MyColumn from MyTable where Len(convert(varchar(8000), MyColumn)) &gt; 500 .<br>Showing the result, SQL7 truncates the field's content down to 257 positions. I tried File-&gt;SaveAs (saved as a text file), but again, received only 257 positions, not the whole original length. Can I hope that the whole-length data could be retrieved back?
 
As my fellow DB-Master advised me:<br>Open MS SQL7 Query Analyzer, go to Query-&gt;Current Connection Options-&gt; Advanced Tab. Find the box Maximum Character per Column (default = 256) and put there the necessary number.<br>I published this for everybody's benefit.<br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top