Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / SQL Server / ADP / January 2006

Tip: Looking for answers? Try searching our database.

Access Project - need to trim fields

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mick Ruthven - 27 Jan 2006 16:27 GMT
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
Sylvain Lafontaine - 27 Jan 2006 16:41 GMT
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.

Signature

Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: http://cerbermail.com/?QugbLEWINF

> 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"
[quoted text clipped - 10 lines]
>
> Mick Ruthven
Mick Ruthven - 27 Jan 2006 16:58 GMT
Thanks, Sylvain! How about a bit more explanation of why the "n"-type fields
are best?

> 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.
Sylvain Lafontaine - 27 Jan 2006 17:06 GMT
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql2k/html/sq
l_dataencoding.asp


http://support.microsoft.com/default.aspx?scid=kb;en-us;322112

Signature

Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: http://cerbermail.com/?QugbLEWINF

> Thanks, Sylvain! How about a bit more explanation of why the "n"-type
> fields
[quoted text clipped - 8 lines]
>> would be to use nchar, nvarchar and ntext fields instead of char, varchar
>> and text fields.
Mick Ruthven - 27 Jan 2006 17:53 GMT
Thanks again, Sylvain. You've made my learning process about this much
quicker.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql2k/html/sq
l_dataencoding.asp


> http://support.microsoft.com/default.aspx?scid=kb;en-us;322112
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.