Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15

How to Create a Data Source from Scratch

provided by
the OpenOffice.org Documentation Project

Table of Contents

  1. Create the Data Source
  2. Adding Tables to a Data Source
  3. Editing Tables in a Data Source
  4. What do I do now?

Create the Data Source

These steps will run you through setting up a Data Source in the OpenOffice.org system.  A dBase type database will be created for cross platform consistancy.

  1. Select the Tools-Data Source menu.
  2. Click New Data Source.
  3. Enter a name for your Data Source.  NOTE:  I am going to use TEST as the Data Source name.
  4. Press Tab.
  5. Select dBase as the Data Source.  NOTE:  We are using dBase, because it allows full control over the database on a local system.
  6. Press Tab.
  7. Enter a directory for the program to store the data files in.  Be sure to enter a directory that DOES NOT exist.  The program will automatically create it for you.
  8. Click Apply.

Adding Tables in a Data Source

In this section, we will go over how to Add tables in a Data Source.  This section assumes that your Data Source allows full access to the database.  Currently, dBase or Spreadsheet are the only types that allow this type of access to files on your computer.  JDBC and ODBC can be used if you already have a Database System setup like MySQL, SQL Server, or ORACLE.

  1. Click on the Tables tab.
  2. Click on the New Table icon.
  3. The Table Design screen will show
  4. Enter Name.
  5. Press Tab 3 times.
  6. Enter Telephone.
  7. Press Tab 3 times.
  8. Enter Address.
  9. Press Tab 3 times.
  10. Enter City.
  11. Press Tab 3 times.
  12. Enter State.
  13. Press Tab 3 times.
  14. Enter Zip.
  15. Click on File.
  16. Click on Save.
  17. Select a Name for your table.  NOTE:  For this How To, we will use TestTable.
  18. Close the Table Design screen.
  19. Close the Data Source window.

Edit data in a Data Source

This section demonstrates how OpenOffice.org can be used to enter, edit, and remove values in a Data Source.

    Adding Records
  1. Press F4.
  2. The Data Explorer window appears.
  3. Click on the Test Data Source.
  4. Click on Tables.
  5. Click on TestTable
  6. If no records exist in the table, anything you type will automatically start a new record. Otherwise, click the New Record button .
  7. Enter the following information pressing tab between fields:
    John Doe 999-999-9999 1234 Anywhere This Town This State 12345
    Jane Doe 122-122-1222 5431 Here Street This Town This State 12345
    Editing Records
  1. Click in John Doe's Telephone field.
  2. Enter 888-888-8888
  3. Press the Down Arrow.  NOTE:  Moving to a new record saves your changes.
    Deleting Records
  1. Click on the Row Selector in front of Jane Doe.  Either or will select the record.
  2. Right click.
  3. Select Delete Rows.

What to do now?

Now that you have seen some of the things that OpenOffice.org can do with Databases, I would suggest the following:

  1. Play around with the different column types when adding tables.
  2. Look into creating SQL statements when in the Data Source screen.

NOTE:  You will not hurt anything by playing around with the database that was created in this How To.

5. Credits

Author : Scott Carr

Intgr by : Gianluca Turconi

Last modified : March 2, 2002

Contacts : OpenOffice.org Documentation Project http://documentation.openoffice.org/index.html

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.