Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 8th, 2008, 09:07 AM
Banned
 
Join Date: Jul 2005
Posts: 317
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem converting datatype text to varchar

I'm trying to convert some of my table's field datatypes from text to varchar, and I was able to do some of them without a problem. But when I tried to finish the last of them, I received this error message:

'tblTABLENAME' table
- Unable to modify table.
ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot create a row of size 8810 which is greater than the allowable maximum of 8060.
[Microsoft][ODBC SQL Server Driver][SQL Server]The statement has been terminated.

I did a count of the characters in the row that I attempted to convert, and the max char count is 2273. I was trying to change it to varchar(5000).

Any ideas on how I can get this to work would be GREATLY appreciated. Thanks.

KWilliams
 
Old August 12th, 2008, 12:40 PM
Friend of Wrox
 
Join Date: May 2006
Posts: 246
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Show us your statement.


 
Old August 14th, 2008, 04:53 PM
Banned
 
Join Date: Jul 2005
Posts: 317
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I figured out how to fix it the other day. I simply lowered the length of a few of the larger columns, and I was able to complete the rest of the data type adjustments.

KWilliams
 
Old August 15th, 2008, 01:58 AM
Friend of Wrox
 
Join Date: May 2006
Posts: 246
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I guess it was this topic that put you in the right direction?
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=108400


 
Old August 15th, 2008, 07:59 AM
Banned
 
Join Date: Jul 2005
Posts: 317
Thanks: 0
Thanked 0 Times in 0 Posts
Default

absolutely:) Thanks for the note peso.

KWilliams





Similar Threads
Thread Thread Starter Forum Replies Last Post
Error converting data type varchar to int. - SQL baysaa SQL Server ASP 1 March 16th, 2008 11:56 PM
Syntax error converting the varchar value... Earl Hickey ASP.NET 2.0 Basics 5 January 23rd, 2008 10:25 PM
Text or Varchar types too small? lancer SQL Server 2000 2 October 2nd, 2006 12:20 PM
Text/large varchar fields in SQL server pseudomorph Classic ASP Databases 0 August 16th, 2006 11:50 PM
Error converting data type varchar to float. Trojan_uk SQL Server ASP 5 April 27th, 2004 02:56 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.