nvarchar

Status
Not open for further replies.

longway

Member
Joined
Mar 9, 2005
Messages
6
Programming Experience
Beginner
I will admit that I don't know much about variable length strings. I have a variable in a database defined as nvarchar 40, and I am setting the parameter in my vb.net program the same way. However, it is receiving all 40 characters. I thought the purpose of variable length strings was that it would receive the string as only the length of the characters. For instance, I thought Chicago would be received as "Chicago" and not "Chicago + 33 spaces". Am I wrong?
 
Last edited:
I had the same problem but found that the database column was actually defined as nchar(40). When a column is defined this way it will return the full length of the column with padding.
 
I had the same problem but found that the database column was actually defined as nchar(40). When a column is defined this way it will return the full length of the column with padding.

Please don't resurrect threads that are almost 9 years old.
 
Status
Not open for further replies.
Back
Top