CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 Custom SQL insert ( right in the designer)

Print topic Send  topic

Author Message
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.


View profile  Send private message
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
View profile  Send private message
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
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.