Adp - Char fields are padded with blanks

  • Thread starter Thread starter Atlas
  • Start date Start date
A

Atlas

Acc2003 + SQL Server; Char fields.
Say I enter some text in the field above shorter then maximum length, blanks
are automatically padded to gain maximum length.
That's annoying 'cause when modifying the field content and inserting new
chars system beeps due to maximum field lenght reached.

Any hint?
 
Atlas said:
Acc2003 + SQL Server; Char fields.
Say I enter some text in the field above shorter then maximum length, blanks
are automatically padded to gain maximum length.
That's annoying 'cause when modifying the field content and inserting new
chars system beeps due to maximum field lenght reached.

Char fields are fixed length with padded spaces. If you don't want that
you need to use VarChar instead.
 
Char fields are fixed length with padded spaces. If you don't want that
you need to use VarChar instead.
Any drawback using VarChar? Variable allocation brings to:.............
 
Atlas said:
Any drawback using VarChar? Variable allocation brings to:.............

Not really. There is a small amount of overhead and Char might be a bit
faster to process, but I would very much doubt if either would ever be an
issue. The documentation recommends Char only when you know that all
records will be the same length (like state abbreviations for example).
 
Back
Top