Jumat, 19 April 2013

RE: [MS_AccessPros] Re: The size of an Access database

 

To further clarify, any text field can be up ro 255 characters long. In the
database, a text field gets stored as a flag byte (to indicate Null), a
length byte, and then the variable data. When you define a field as less
than 255, that simply informs the User Interface to not allow more than the
characters specified to by typed in the field.

John Viescas, Author

Microsoft Access 2010 Inside Out

Microsoft Access 2007 Inside Out

Microsoft Access 2003 Inside Out

Building Microsoft Access Applications

SQL Queries for Mere Mortals

http://www.viescas.com/

(Paris, France)

From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Bill Mosca
Sent: Friday, April 19, 2013 5:58 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Re: The size of an Access database

Ray

There are two basic types of character fields. Variable length (varchar) and
fixed length (char). Access uses the varchar type. That means, as Clive
said, only the needed space is allocated to each text field. The size is
really only the maximum size. If the postal code is never bigger than 10,
then you should set the field's size to 10 so extra characters are not typed
in by accident.

Regards,
Bill Mosca, Founder - MS_Access_Professionals
http://www.thatlldoit.com
Microsoft Office Access MVP
https://mvp.support.microsoft.com/profile=C4D9F5E7-BB03-4291-B816-6427073088
1E
My nothing-to-do-with-Access blog
http://wrmosca.wordpress.com

--- In MS_Access_Professionals@yahoogroups.com
<mailto:MS_Access_Professionals%40yahoogroups.com> , "Ray" <rayfrew@...>
wrote:
>
> Hi Clive
>
> Thanks for your thought. I was only using postcode as an example of a
field. There are usually many text fields in the databases I look at -
usually to do with training and training courses.
>
> It's interesting that Access defines / allocates the space as it's needed.
>
> Thanks
> Ray
>
> --- In MS_Access_Professionals@yahoogroups.com
<mailto:MS_Access_Professionals%40yahoogroups.com> , "Clive" <zctek@> wrote:
> >
> > Hi Ray,
> >
> > The space defined for a Text field is not used until you
> > enter a value that nearly fills the defined allocation.
> >
> > If your PostCode field is for the UK Only then it is OK
> > to have a 10byte field, probably with a format of '>'
> > and an Inputmask of '>CCCCCCCCCC' to force it to
> > uppercase.
> >
> > Regards, Clive.
> >
> > --- In MS_Access_Professionals@yahoogroups.com
<mailto:MS_Access_Professionals%40yahoogroups.com> , "Ray" <rayfrew@> wrote:
> > >
> > > I'm pondering about the amount of disc space a database takes and
wondered if you could help. If I design tables with field sizes that should
be just big enough for the data e.g. UK postcode as a 10 character text
field, is that better than taking the default 50 characters? Does Access
take the amount of disc space it needs to hold the actual data stored or
does it reserve the whole amount as defined in the table definition?
> > >
> > > Any thoughts or pointer would be helpful.
> > > Thanks
> > > Ray
> > >
> >
>

[Non-text portions of this message have been removed]

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (5)
Recent Activity:
MARKETPLACE


.

__,_._,___

Tidak ada komentar:

Posting Komentar