473,395 Members | 1,937 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

nvarchar Question

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
Jul 19 '05 #1
1 1697
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

"Don Grover" <sp******@assoft.com.au> wrote in message
news:eY**************@TK2MSFTNGP12.phx.gbl...
: 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
:
:
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Turloch O'Tierney | last post by:
Hi, I was wondering if the unicode datatypes can be retrieved through the jdbc-odbc bridge using a java client, I am currently getting question marks from NCHAR and NVARCHAR fields, and numbers...
2
by: Vani Kancherlapalli | last post by:
Hi The maximum length of a nvarchar could be 4000 characters while that of varchar could be 8000. We are trying to use unicode which would require that the datatype for one our fields be...
1
by: Billy Cormic | last post by:
Hello, This is a simple question, hopefully with a simple answer. I have an nvarchar column of length 255. In one of the rows I have the following sentance - 'See the brown ball bounce'. Is it...
7
by: Oleg Ogurok | last post by:
Hi all, I need to store data into about 104 columns. This is problematic with MS SQL, since it doesn't support rows over 8kb in total size. Most of the columns are of type NVARCHAR(255), which...
3
by: arijitchatterjee123 | last post by:
Hi Group, I am new with SQL Server..I am working with SQL Server 2000. I am storing the date in a nvarchar column of atable.... Now I want to show the data of Weekends..Everything is OK...But the...
4
by: wriggs | last post by:
Hi, This is probably an easy question for someone so any help would be appreciated. I have changed the columns in a table that where nvarchar to the same size of type varchar so halve the...
1
by: iporter | last post by:
Hi - I am changing a field from type nvarchar to type text, given that I need to store strings longer than 255 characters. To do this I change the data type in SQL Server, then I change the...
4
by: D. | last post by:
Hi, I'm starting a new application in java using JTDS jdbc driver (http://jtds.sourceforge.net) and SQLServer 2005 Express. I have to design the database from scratch and my doubt is if I have to...
4
by: stuckish | last post by:
My collegue is saying that you should store text data in Sql Server i unicode fields (nvarchar) beause that .net (asp.net website) is all unicode and therefore you save some time not having to...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.