CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Custom insert does not insert data

Print topic Send  topic

Author Message
Idris Jones
Posted: 12/12/2003, 8:34 AM

I have a record form consisting of info from two tables in Oracle 8i. I've created a custom insert to only insert the relevant data into the parent table (as you can only insert into one table at a time), and then added some "save control value" and "custom sql" in the "after execute insert" area of "Events".
When I publish the project, it compiles fine, and works fine, I enter the data into the record form, and click submit, but when I check my database in oracle, it has only inserted data into the parent table, and not the second.
Don't know if I've put the code in the right place or what.

Any help or suggestions??
Idris Jones
Posted: 12/12/2003, 8:54 AM


//Event AfterExecuteInsert Action Save Control Value @68-C50A05C0
String MAG_CALL_NUMBER = ((com.codecharge.components.TextBox) ((com.codecharge.components.Record) (e.getPage().getChild( "NewRecord1" ))).getChild( "MAG_CALL_NUMBER" )).getValue().toString();
//End Event AfterExecuteInsert Action Save Control Value
//Event AfterExecuteInsert Action Save Control Value @69-640C24A1
String MAG_ID = ((com.codecharge.components.ListBox) ((com.codecharge.components.Record) (e.getPage().getChild( "NewRecord1" ))).getChild( "MAG_ID" )).getValue().toString();
//End Event AfterExecuteInsert Action Save Control Value
//Event AfterExecuteInsert Action Save Control Value @70-7B48DE4E
String VOLUME = ((com.codecharge.components.TextBox) ((com.codecharge.components.Record) (e.getPage().getChild( "NewRecord1" ))).getChild( "VOLUME" )).getValue().toString();
//End Event AfterExecuteInsert Action Save Control Value
//Event AfterExecuteInsert Action Save Control Value @71-BFBFDB52
String ISSUENO = ((com.codecharge.components.TextBox) ((com.codecharge.components.Record) (e.getPage().getChild( "NewRecord1" ))).getChild( "ISSUENO" )).getValue().toString();
//End Event AfterExecuteInsert Action Save Control Value
//Event AfterExecuteInsert Action Save Control Value @72-A0D69045
String PAGES = ((com.codecharge.components.TextBox) ((com.codecharge.components.Record) (e.getPage().getChild( "NewRecord1" ))).getChild( "PAGES" )).getValue().toString();
//End Event AfterExecuteInsert Action Save Control Value
//Event AfterExecuteInsert Action Save Control Value @73-F389BB06
String DATE_OF_MAGAZINE = ((com.codecharge.components.TextBox) ((com.codecharge.components.Record) (e.getPage().getChild( "NewRecord1" ))).getChild( "DATE_OF_MAGAZINE" )).getValue().toString();
//End Event AfterExecuteInsert Action Save Control Value
//Event AfterExecuteInsert Action Custom Code @66-44795B7A
try
{
JDBCConnection conn = JDBCConnectionFactory.getJDBCConnection("Oracle");
String SQL = "INSERT INTO MAGAZINEARTICLE (MAG_CALL_NUMBER, MAG_ID, VOLUME, ISSUENO, PAGES, DATE_OF_MAGAZINE) VALUES ('MAG_CALL_NUMBER', 'MAG_ID', 'VOLUME', 'ISSUENO', 'PAGES', 'DATE_OF_MAGAZINE')";
conn.executeUpdate(SQL);
conn.closeConnection();
}
catch( Exception ex )
{
System.out.println("Error al conectarse a la base de datos ppal..." + ex.getMessage());
}
//End Event AfterExecuteInsert Action Custom Code

   


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.