Bringing New Data Into a New or Existing Table

So you've got a new table or fieldgreat. Now what? To get data into it, you have a number of options.

Use Your Database Tools

If your database has tools that let you easily and quickly import data into a new table, use them. Consult your database's documentation for more information.

Use the Form

You might have just created the new field to store information from a new field in a data entry form. For instance, if you've recently decided whether you want to track whether your customers are Sun Certified Java Programmers. You'll need a field on the form to record that, and a field in your table to store the 1 for yes or the 0 for no.

graphics/35inf08.jpg

In that case, just set up the field in the form to store data in your new field. (Right-click the field, choose Control, select the Data tab, and select the field.) For more information, see Basics for Creating a Form on Your Own on page 932.

graphics/35inf09.jpg

Then use the form to go through each record and make the appropriate entry in the field.

If you simply created an entire new field and the quickest way you can think of is to just enter it through the form, then go ahead and do that. See Adding a Record on page 955.

Editing Data Using the Data Source Viewer

This applies to all data sources except text files, spreadsheets, and address books, and of course if your JDBC connection or database setup doesn't allow it, you won't be able to use it either.

graphics/35inf10.jpg

However, for basic data sources like dBase, just choose View > Data Source and type the data you want in each field.

Entering a Longer Value Than the Field Wants to Accept

When you create a data source, the maximum field length is defined as the longest field in any record. For instance, your maximum field length for last names might be 13 letters , because of Alan van Luxembourg. However, when Ruth Robinson gets remarried and changes her name to Ruth Robinson Boughten-Wise, you're not going to have room in the Last Name field for "Robinson Boughten-Wise".

graphics/35inf11.jpg

How do we solve this? Easy, just edit the table definition and increase the maximum field size. See Modifying a Table or Field on page 912 for more information.



OpenOffice. org 1.0 Resource Kit
OpenOffice.Org 1.0 Resource Kit
ISBN: 0131407457
EAN: 2147483647
Year: 2005
Pages: 407

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net