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
 Development Tools
 Other Development Tools
 nvarchar character limit

Author  Topic 

abehr
Starting Member

1 Post

Posted - 2005-06-06 : 03:10:16
I have an asp page that updates a sql 2000 database. The table that is being updated/added to contains an nvarchar field that is set to 8000 charcters maximum, but I can't seem to enter more than about 1000. I tried doing it in SQL Server Enterprise Manager and got 1023 charcters in, but then I read that SEM doesn't allow more than 1023 to be inserted by some design quirk. As I understand, it is technically possible for an asp page to insert more than 1000 characters but I can't for the life of me figure it out. Can someone shed some light on this issue for me?

Cheers

ab

raclede
Posting Yak Master

180 Posts

Posted - 2005-06-06 : 05:03:59
well I know that nvarchar field is limit is only 4000.. and if you are only using English just switch to varchar which has a limit of 8000

"If the automobile had followed the same development cycle as the computer, a Rolls-Royce would today cost $100, get a million miles per gallon, and explode once a year, killing everyone inside. "

raclede
Go to Top of Page

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2005-06-06 : 05:32:36
Also remember that a row can't be bigger than 8k (text columns not included), so although you can have say 3 nvarchar(3000) columns, if you try to fill them to capacity your INSERT will fail.

But, Enterprise Manager isn't a great data entry tool, especially for large chunks of data, so it's not a great idea to try to use it as such.

If you create an ASP page you can insert much more.


Damian
Ita erat quando hic adveni.
Go to Top of Page
   

- Advertisement -