Access Project - need to trim fields

  • Thread starter Thread starter Mick Ruthven
  • Start date Start date
M

Mick Ruthven

This is my first Access Project to develop, so I'm learning the ropes of
dealing with SQL Server. One thing that cropped up is that the "char" fields
seem to be filled with training blanks. On forms that's only "strange" and
an inconvenience, but on reports it can force extra rows for "can grow"
fields. I solved the problem by doing an rtrim() on all the fields in a
query before using them in forms and reports. I could use varchar instead of
char to avoid the issue and the need to trim. I may be missing something
about this issue. What's the best practice here?

Thanks,

Mick Ruthven
 
Excerpt for one char long fields and fixed size fields like serial numbers,
you should always use varchar instead of char on SQL-Server.

Because of internationalisation and localisation issues, an even better idea
would be to use nchar, nvarchar and ntext fields instead of char, varchar
and text fields.
 
Thanks, Sylvain! How about a bit more explanation of why the "n"-type fields
are best?
 
Back
Top