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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Setup of new table - Help

Author  Topic 

ringfoon
Starting Member

3 Posts

Posted - 2009-12-29 : 02:31:53
Hello,

We have a .net apllication in Dutch. All the labels are hardcoded in the application itself at the moment. Now we need to transelate the complete app in French. Instead of doing this hardcoded we would like to put all the labels in a table in our sql db. So adding an other language in the future will be easy. I've gattered all the different labels and info texts. I've come to a total of 500 labels.

At the moment I've creates an new table and set it up like this:
Id - data type (int) - identity
field_1 - data type (text)
field_2 - data type (text)
field_3 - data type (text)
field_4 - data type (text)
.......
field_500 - data type (text)

I'm trying to add the labels in the new table but at about kolom 430 I run into a "Cannot create a row of size (n) which is greater than the allowable maximum of 8060" problem." I thought that 'text' data type's were not stored in the db itself so these doesn't take any of the 8060kb of the row?

Can any body give me a hint for a correct set up of this?

Thank you...

blindman
Master Smack Fu Yak Hacker

2365 Posts

Posted - 2009-12-29 : 09:54:27
User varchar(max) instead of text.

________________________________________________
If it is not practically useful, then it is practically useless.
________________________________________________
Go to Top of Page

Transact Charlie
Master Smack Fu Yak Hacker

3451 Posts

Posted - 2009-12-29 : 10:13:30
you've still got 500 columns!

Internationalisation is a complete pain in the ass if you haven't planned for it in the beginning.

I think you should instead think about replacing this multi column monster with a structure more like

[unique Text Identifier] (a foreign key to whatever article of text you want to translate)
[language] (either a foreign key to a language table or a identifier like en_GB
[translatedText] NVARCHAR(MAX) -- the text translation for the target text

That way you get infinite translation without killing the row size.


Charlie
===============================================================
Msg 3903, Level 16, State 1, Line 1736
The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION
Go to Top of Page
   

- Advertisement -