var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Insert into 2 tables
I'm developping a J2EE web based application which uses INFORMIX DB. I have to insert data in 2 tables : CUSTOMER and USER.
CUSTOMER(id_customer(serial)<pk>, name, mail ..., id_user(int)<fk>)
USER(id_user(serial)<pk>, login, passwd ...)
the constraint I have on these tables is of course:
alter table CUSTOMER
add constraint foreign key (ID_USER)
references USER (ID_USER)
I have a web form where the user can fill his information (name, mail, passwd, login ...)
I'm sure you already know my question.
Which is the best way to insert these values in both tables and keep them related ?
thanks a lot for your help,
I'm in an java environement so I can use the Java APIs. Maybe it is possible to handle this problem with java.sql classes ?
isn't there a java function which returns the int of the SERIAL that has just been incremented ?
int executeInsert(String query) ?