OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Insert Into statement with HSQLDB on Buttonclick

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base
View previous topic :: View next topic  
Author Message
joebrooklyn
Newbie
Newbie


Joined: 09 Feb 2006
Posts: 2

PostPosted: Thu Feb 09, 2006 9:10 am    Post subject: Insert Into statement with HSQLDB on Buttonclick Reply with quote

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
View user's profile Send private message MSN Messenger
DrewJensen
Super User
Super User


Joined: 06 Jul 2005
Posts: 2616
Location: Cumberland, MD

PostPosted: Thu Feb 09, 2006 9:38 am    Post subject: Reply with quote

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.. Very Happy 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
View user's profile Send private message Send e-mail Visit poster's website
joebrooklyn
Newbie
Newbie


Joined: 09 Feb 2006
Posts: 2

PostPosted: Thu Feb 09, 2006 1:30 pm    Post subject: Thanks Reply with quote

Thanks a lot Drew Smile - I am looking forward to seeing the code with the connection and the values of the controls.

CU Joe
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group