|
-
Sep 28th, 2010, 09:45 AM
#1
Thread Starter
Frenzied Member
[RESOLVED] nvarchar or varchar that is the question
We are doing a software upgrade and data migration from an Access 2000 app using SQL server 2000 to a .NET fromtend with SQL server 2005 backend. It is about 50% purchased app with 50% custom code added.
Now the question. The app has changed to using nvarchar. So all thier tables use that. Our tables use varchar. Should we keep them that way? Should we change to nvarchar for consistency? As far as I can tell we don't explicitly use unicode chars anywhere so will changing just increase network traffic and the storage on the DB? Is there any benefit at all to using nvarchar?
Thanks.
VB6 Library
If I helped you then please help me and rate my post!
If you solved your problem, then please mark the post resolved
-
Sep 28th, 2010, 09:54 AM
#2
Re: nvarchar or varchar that is the question
The benefit is being able to support unicode... if you know without a doubt you will never, ever support unicode... it's probably negligible... but if there's a chance... go ahead and make the changes. It might mean slight increase in network traffic, but it should be negligible... for DB storage... by it's very nature unicode does take up more space... but not enough to discount it. As long as you aren't maxing out your nvarchar fields on hundreds of thousands of rows, you shouldn't notice much of a difference.
-tg
-
Sep 28th, 2010, 09:56 AM
#3
Re: nvarchar or varchar that is the question
The difference between nvarchar and varchar is that nvarchar can store unicode characters that varchar can't, so if there's the remote possibility that unicode chars will be stored then use nvarchar now, otherwise leave it as varchar (note access databases use varchar to store text, there is no unicode storing option that I know of)
Using nvarchar does take up more storage space, even if the fields are blank in the table(s) so I wouldn't use it at all if I know that unicode chars will never need to be stored.
-
Sep 28th, 2010, 10:24 AM
#4
Thread Starter
Frenzied Member
Re: nvarchar or varchar that is the question
OK, thanks guys. It seems it doesn't matter much either way. I shared your comments with the other programmer and we do not have any plans to use unicode, and since it requires no work to leave them alone, that is what we chose, do nothing and leave them as varchar.
VB6 Library
If I helped you then please help me and rate my post!
If you solved your problem, then please mark the post resolved
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|