FupDuk
Posts: 4
|
| Posted: 02/23/2009, 5:57 AM |
|
I am trying to submit 2 records with one button.
i have records RECORD1 & AUDIT1 (both using same dataset), but i want to be able to change both, and submit them both at the same time with one button. at the moment i can only submit one record using the submit button on that record.
Many thanks
Kim
|
 |
 |
datadoit
|
| Posted: 02/23/2009, 7:57 AM |
|
If they're both using the same dataset, then merge into one form.
Otherwise, you'll have to use Custom Update/Insert.
|
|
|
 |
dataobjx
Posts: 181
|
| Posted: 02/23/2009, 6:49 PM |
|
Of course. Add your additional insert into the "After_Insert" event.
Refer to the help file:
F1 help... then go to Examples and Techniques --> programming --> Working with databases --> Execute Custom SQL
_________________
www.DataObjx.net
www.mydigitalapps.com |
 |
 |
FupDuk
Posts: 4
|
| Posted: 02/25/2009, 5:28 AM |
|
is it not possible to very simply just tell it to update the other record at the same time as updating the one you submit?
sorry, but i am not at all familiar with SQL
|
 |
 |
dataobjx
Posts: 181
|
| Posted: 02/25/2009, 2:11 PM |
|
In short, no. They are - and rightfully should be - two separate transactions.
SQL only updates one table at a time.
_________________
www.DataObjx.net
www.mydigitalapps.com |
 |
 |
blasalle
Posts: 69
|
| Posted: 02/25/2009, 4:25 PM |
|
If what you trying to do is audit the transaction - it might be easier to do this at the database level with a trigger. We do this in PostgreSQL for all of our data tables. It's straightforward to do.
bernie
_________________
Bernie
University of Utah
Salt Lake City, UT USA |
 |
 |
dataobjx
Posts: 181
|
| Posted: 02/25/2009, 7:55 PM |
|
blasalle is absolutely right! There are a number of ways... I provided a generic answer, but as blasalle points out, it can indeed be performed with a trigger.
It's difficult to provide assistance when the database (SQL Server, Progress, MySQL) is not mentioned.
In the absence of such information... its far more difficult to provide a concise answer.
dataoit, can you provide us with more information?
_________________
www.DataObjx.net
www.mydigitalapps.com |
 |
 |
FupDuk
Posts: 4
|
| Posted: 02/26/2009, 2:46 AM |
|
Sorry for the vagueness.
the database at the back end is actually SAS!!
|
 |
 |