SQLCE nvarchar length

  • Thread starter Thread starter Amirallia
  • Start date Start date
A

Amirallia

Hello

I want to know the length of the nvarchar column in a SQLCE table

I know if the datatype is nvarchar or not with the statment
tbl.Columns(i).DataType.Name, but I can't get the length of the
nvarchar field.

Any idea ?
 
By nature it's variable. IIRC from my SQL 6.5 days it's characters + 17 for
varchar, so nvarchar is probably 2x that (accounting for unicode)

--
Chris Tacke
Co-founder
OpenNETCF.org
Has OpenNETCF helped you? Consider donating to support us!
http://www.opennetcf.org/donate
 
Well, you may query INFORMATION_SCHEMA.COLUMNS for such information, e.g.:

SELECT CHARACTER_MAXIMUM_LENGTH FROM INFORMATION_SCHEMA.COLUMNS WHERE
TABLE_NAME='yourTable' AND COLUMN_NAME='column'


Best regards,
Sergey Bogdanov
http://www.sergeybogdanov.com
 
Il se trouve que Sergey Bogdanov a formulé :
Well, you may query INFORMATION_SCHEMA.COLUMNS for such information, e.g.:

SELECT CHARACTER_MAXIMUM_LENGTH FROM INFORMATION_SCHEMA.COLUMNS WHERE
TABLE_NAME='yourTable' AND COLUMN_NAME='column'


Best regards,
Sergey Bogdanov
http://www.sergeybogdanov.com

ok thank you, it works!!!!
 
Back
Top