| View previous topic :: View next topic |
| Author |
Message |
joebrooklyn Newbie

Joined: 09 Feb 2006 Posts: 2
|
Posted: Thu Feb 09, 2006 9:10 am Post subject: Insert Into statement with HSQLDB on Buttonclick |
|
|
Hi!
I am new to Open Office Base and want to save the content of multiple fields of a form with more than one insert statement on a button click. (There are 3 different Tables used on this Form)
How can I do do this?
I need access to the selected values of the controls and put them into the insert statement
I think this should result in something like
sql = "Insert Into tableA values (0,'test',"+comboBoxTest.value()+")";;
How can i execute this statement? (dbConnection, commit, ...)
Makro with BeanShell and OO_Basic?
Thanks in advance
Joe |
|
| Back to top |
|
 |
DrewJensen Super User


Joined: 06 Jul 2005 Posts: 2616 Location: Cumberland, MD
|
Posted: Thu Feb 09, 2006 9:38 am Post subject: |
|
|
I am in the middle of showing exactly this type of action in another thread.
http://www.oooforum.org/forum/viewtopic.phtml?t=31472
The basic code to updating two tables is already in the thread.
I will putting up the form and the basic code attched to the button, directly after answering this post.. So give it a little time and go check it out.
The code I am putting up next will also show how to handle this using an ISOLATED CONNECTION so that we can support mutiple table updates as a single transaction with our own commit or rollback at the business transaction level vs the single table commits used by default in the Base UI. _________________ Blog - http://baseanswers.spaces.live.com/ |
|
| Back to top |
|
 |
joebrooklyn Newbie

Joined: 09 Feb 2006 Posts: 2
|
Posted: Thu Feb 09, 2006 1:30 pm Post subject: Thanks |
|
|
Thanks a lot Drew - I am looking forward to seeing the code with the connection and the values of the controls.
CU Joe |
|
| Back to top |
|
 |
|