nvarchar Question

D

Don Grover

I have an asp page that updates a ms sql 2k db.

If put a name in a db field of 12 characters should the nvarchar length be
set to 24 to allow for double byte characters.

Should I be using nvarchar or char as when i make my input field length in
asp page 12 the insert fails but if i make it 3 or 4 it works ok even though
the db field length is set to same as asp field length.

Regards
Don
 
K

Ken Schaefer

No - it should be set to 12. Each character takes up 2 bytes of hard disk
space (and counts as two bytes towards the 8 kb row length limit)

Post the error you are getting.

Cheers
Ken

: I have an asp page that updates a ms sql 2k db.
:
: If put a name in a db field of 12 characters should the nvarchar length
be
: set to 24 to allow for double byte characters.
:
: Should I be using nvarchar or char as when i make my input field length in
: asp page 12 the insert fails but if i make it 3 or 4 it works ok even
though
: the db field length is set to same as asp field length.
:
: Regards
: Don
:
:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,126
Messages
2,570,750
Members
47,307
Latest member
Wimble

Latest Threads

Top