salimma Newbie

Joined: 11 Oct 2003 Posts: 1
|
Posted: Sun Oct 12, 2003 6:19 pm Post subject: Need help: Working with large MySQL table |
|
|
Hello,
I am trying to design a form-based Writer document to interface with a remote MySQL database, and am having this problem: the table used, 'personal', has > 20,000 entries; loading this takes a lot of time and memory, during which OOo is not responding.
I would like to be able to use a textbox to input the record ID, press Enter and have other text fields updated; however I could not find 'Link master/slave fields' options under the 'Data' tab of the text field controls.
Would really appreciate any advice. Wish there are templates for this...
Thanks,
Michel |
|
Safway Power User

Joined: 14 Oct 2004 Posts: 90
|
Posted: Thu Oct 14, 2004 10:24 am Post subject: Use parent/child forms |
|
|
If I understand what you are saying, then there is documentation for this. You can accomplish this by using a master/slave form setup with sql statements.
Here is how I have done it.
Create a form (we will call it the master form)
Create a sub-form (we will call it the slave form)
Use sql statements to pull just the record of interest to your screen.
Example sql statement: SELECT * FROM personal WHERE pers_id = :parent_pers_id;
Examples of creating master/slave forms and using SQL to do what you want can be found at http://documentation.openoffice.org. Specifically, the document "How to Link Tables Using SQL Named Parameters" was helpful to me.
The "Link master/slave fields" you are mentioning is there (at least in the 1.1.2 version). The documentation above shows you how to get to it. |
|