rashid11
Posts: 5
|
Posted: 06/26/2004, 11:42 AM |
|
Need to be able to insert into more than 1 table upon submission of the form. While there is a way to code that
via server-side code (java etc) , CCS also offers "custom" SQL insert type through the designer menu.
Can I have multple SQL insert statements provided in that text window ? I am using custom statements against varios tables,
but it is always one statement at a time ... Will multiple ones work ? Same for updates/deletes ? It would be very helpful to
do that.
|
|
|
peterr
Posts: 5971
|
Posted: 06/26/2004, 12:02 PM |
|
Multiple SQL statements in the IDE will not work for several reasons. For example if inserting a record into a 2nd table depends on the 1st insert then then this may not work correctly and could appear "buggy" to the users.
Inserting via custom code is safer and offers more flexibility. Just in case you haven't seen a simple way to do this, here is an example: http://docs.codecharge.com/studio/html/ProgrammingTechn...eCustomSQL.html
In some cases it may also be more efficient to utilize your database functionality for this, for example Stored Procedures or Triggers.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
|
|
E43509
Posts: 283
|
Posted: 06/27/2004, 9:26 PM |
|
I either call a procedure that does all of the inserts/updates or add code to the event for after execute sql to do the other sql statements
|
|
|
|