Creating a Table and a Form to Store Images

From NeoWiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 01:17, 18 October 2007 (edit)
Lorinda (Talk | contribs)
(begin article)
← Previous diff
Revision as of 01:19, 18 October 2007 (edit) (undo)
Lorinda (Talk | contribs)
(Create A New Table - add primary key and naming steps)
Next diff →
Line 17: Line 17:
#::'''Note:''' The LinkToFile field is included on the assumption that the tutorial will eventually be expanded to cover turning a field's entry into a clickable hyperlink. #::'''Note:''' The LinkToFile field is included on the assumption that the tutorial will eventually be expanded to cover turning a field's entry into a clickable hyperlink.
#You may also enter field descriptions if you like #You may also enter field descriptions if you like
-#Click on the {{Button|Save}} button on the toolbar (the disk drive image) or hit {{Key|Command-S}}.+#Control-click or right-click on the empy "cell" to the left of the Pic_ID field. Choose {{Menu|Primary Key}} from the contextual menu that appears.
 +#Click on the {{Button|Save}} button on the toolbar (the disk drive image) or hit {{Key|Command-S}}. Name the table Bird_Pictures.
#Close the {{Window|Table Design}} window. #Close the {{Window|Table Design}} window.
'''Note:''' Unlike other field types, images cannot be added directly to a table. Images can only be entered through a form. '''Note:''' Unlike other field types, images cannot be added directly to a table. Images can only be entered through a form.
 +
 +===Create A Form===

Revision as of 01:19, 18 October 2007

This article is part of the To Base and Back Again tutorial series.

Suppose that our birder decided she or he wanted to also store pictures of particular birds in this database. It is possible for Base to store images, using the Image [LONGVARBINARY] field type. The tutorial below demostrates how to do that.

It should be noted, however, that storing large images and/or lots of images in an odb file can bloat the file to a very large size and create problems. Another approach is to store the locations of the image files in the database. That technique, however, goes beyond the scope of this tutorial--at least for the moment.

Create A New Table

  1. In the main database document window, click on the Tables icon in the left hand column.
  2. Double click on the Create Table in Design View icon in the Tasks section.
  3. In the Table Design window, create the following fields
    Pic_ID - Integer - Autovalue: Yes; Autoincrement Statement: IDENTITY
    DateTaken - Date - Entry Required: Yes; Format Example: as you desire I reccommend a YYYY format.
    BirdPictured - Text [VARCHAR] - Entry Required: Yes;
    Picture - Image [LONGVARBINARY] - Entry Required: Yes
    PicFieldTripID - Integer - AutoValue: No; Entry Required: No
    LinkToFile - Text [VARCHAR_IGNORECASE] - Entry required: No; Length: 500
    Note: The LinkToFile field is included on the assumption that the tutorial will eventually be expanded to cover turning a field's entry into a clickable hyperlink.
  4. You may also enter field descriptions if you like
  5. Control-click or right-click on the empy "cell" to the left of the Pic_ID field. Choose Primary Key from the contextual menu that appears.
  6. Click on the Save button on the toolbar (the disk drive image) or hit Command-S. Name the table Bird_Pictures.
  7. Close the Table Design window.

Note: Unlike other field types, images cannot be added directly to a table. Images can only be entered through a form.

Create A Form

Personal tools