C#/SQL 2k app, should my tables be nvarchar (unicode) or varchar? 
Author Message
 C#/SQL 2k app, should my tables be nvarchar (unicode) or varchar?

I'm writing an app with C# that uses a SQL Server 2000 database.  C# stores
character data in unicode, right?  Now, when I design my database, should I
be using nvarchar instead of varchar?  If C# is unicode and my database is
varchar (ASCII), doesn't that imply that some sort of conversion will take
place (more overhead)?  Wouldn't I be better off specifying nvarchar
(unicode) fields in my database?


Sun, 04 Jul 2004 01:01:48 GMT  
 C#/SQL 2k app, should my tables be nvarchar (unicode) or varchar?
I see no reason to use varchars anymore. The benefits of double byte
(nvarchar) storage far outweigh any paltry costs for the extra HDD space
needed. This wasn't true 5 years ago, but it certainly is today.

80GB HDD $118 U.S. (Not the one to put in a high end server, but at $118 it's
roughly equivalent to the cost of a developer for 1 hour.)
http://www.pricewatch.com/1/26/2480-1.htm

Keep Smilin'
Ed Stegman


Quote:
> I'm writing an app with C# that uses a SQL Server 2000 database.  C# stores
> character data in unicode, right?  Now, when I design my database, should I
> be using nvarchar instead of varchar?  If C# is unicode and my database is
> varchar (ASCII), doesn't that imply that some sort of conversion will take
> place (more overhead)?  Wouldn't I be better off specifying nvarchar
> (unicode) fields in my database?



Sun, 04 Jul 2004 03:46:18 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Bug in SQL Server 2000 ODBC driver when inserting unicode data in a non-unicode long varchar (text) column

2. How to create UNICODE database app using VC++5.0 with SQL SVR 7.0

3. Inserting bytes into binary field in SQL 2K

4. Newbie: Search form for SQL 2K DB

5. service dependency and MS SQL Server 2K

6. SQL 2k access violation

7. Help - Locking issue in sql server 2k in 6.5 comp mode

8. How to access SQL 2K???

9. NT/2k Services/MAPI/Outlook/SQL Design Issues

10. C# , i am trying to create a file on the server using C#

11. Word 2K Automation from C#

12. Unicode via wofstream: What am I doing wrong?

 

 
Powered by phpBB® Forum Software