Storing Text

  • Thread starter Thread starter Vayse
  • Start date Start date
V

Vayse

Hi
What do people use for storing text?
In Access, I used Text. (of course!)
In SQL, there's Char, nchar, VarChar, nvarchar and Text.
For ADP projects, is there a particular type I should choose?

I've used VarChar, and it pads out the string to the appropiate lenght. So
I'm looking for a way around this, withour resorting to Trim.
Thanks
Diarmuid
 
Varchar and nvarchar are what you'll probably use most.

Char and nchar will pad your text to however long you specify, and are most
useful for storing ID's, maybe phone/fax numbers (if they don't have
extensions and they're not international), postal codes (again, if they're
not international), that sort of thing.

The deciding factor for whether to use the nchar/nvarchar types is usually
whether you expect to have non-English characters in that field. If you
expect to use non-English characters, use nchar/nvarchar, otherwise there's
probably no need to.



Rob
 
Thanks.
There's a few things that are different, will hopefully get the hang of this
adp stuff soon. Still, its nice to learn something new!
Diarmuid
 
Back
Top