|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
I am writing a utility that takes an Access database, creates the same database in SQL Server (using OSQL) and then copies the data from one to the other. When I create a table called itemdata I get the following warning:
Warning: The table 'itemdata' has been created but its maximum row size (11665) exceeds the maximum number of bytes per row (8060). INSERT or UPDATE of a row in this table will fail if the resulting row length exceeds 8060 bytes. However, when I add up the sizes of all the columns in that table they come to just 5,803. Does SQL Server add some kind of meta data to the columns which makes the records larger or is something else to blame? Thanks in advance. |
|
#2
|
||||
|
||||
|
SQL Server does seem to store a lot of extra info for its databases, but I wouldn't have thought it'd be that much more. How does your itemdata table differ from other tables that are created successfully? Is it a lot larger? Does it have an abundance of one data type not found in other tables? I'm not familiar enough with SQL Server's setup to offer much help, but maybe considering some questions like these will help you figure out what other questions to google for.
__________________
Please don't PM me asking for solutions outside the scope of a thread. Keeping all responses in a thread stands to help others who come along later, which is after all what this forum's all about. |
|
#3
|
|||
|
|||
|
itemdata is the largest of all my tables and it's made up of nothing but varchars which is the same for my other tables. The thing is that one of the fields in Access was a memo field which means it has virtualy no limit on how big it can be. But in SQL Server I don't have that option so I'm trying to make it a reasonable size without truncating any of the records I'm copying over from Access and at the same time leaving enough room for future records we may want to add.
|
|
#4
|
||||
|
||||
|
Hmmm, tricky. What field type have you made the memo field? Maybe having a huge varchar screws the limit and changing that field to a text or comparable field (I don't remember the data type in SQL Server, but I think it's text, as it is in mysql) would solve your problem.
|
|
#5
|
|||
|
|||
|
I made all the fields nvarchar. What's the difference between that, varchar, and text?
Actualy looking back at the Access database all the fields are text. When I exported the table to SQL Server the export made all the fields nvarchar and the memo field ntext of size 16. So I changed the memo field to a size of 4000 and type nvarchar. I then used the utility in SQL Server which allows you to generate the commands for creating the current tables. That's how I got them all to be nvarchars. If I change the type of the field to text it won't let me change the size of it to anything other than 16. Edit: In case anyone is interested here is why the nvarchar fields are so large http://www.ispirer.com/doc/sqlways37/Output/SQLWays-1-069.html |
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft SQL Server > Maximum row size |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|