Insert records from user form to multiple tables in same database
Hi Experts, I need your help. I have a form that has multiple text fields that I need to insert the records to their each respective table. For example: The first name field needs to go the the name table, address goes to a seperate table, phone goes to a seperate table and so on.
Is this possible to do?
Thanks Much
Sham
The same for ASP, JSP or PHP. Just the code syntax is different for each language. Are you using MySQL, Access or ?
In any case, create the three recordsets on the database and use insert queries. If you don't know what one is, google insert query and you will see the syntax.
Here is a good example out on the web
http://www.stardeveloper.com/articles/display.html?article=2000032601&page=1
In your case you would get the values for the inserts from the form data and only need to open the database connection once.
Good luck.
Walt
B & B Photography
Similar Messages
-
Inserting data from jsp form to multiple tables !
Hi,
I want to insert data from jsp form to two tables
tables are
(1) Form
formId (PK)
deptName
(2) Data
formId (FK)
sNo
description
itemCode
and the problem is that i want to save information form a jsp form to above two tables and i have only one form.
so how do i insert data from a jsp form to multiple tables.You already know what your form in the jsp will be and what fields they are. You also already know what your database looks like. Using one form, you should be able to break the data down, and give it certain ids and/or names, so that when the form is submitted, you retrieve the correct values corresponding to a specific field and insert it.
Unless there is something else I am not catching, this seems pretty straight forward. -
Insert records from report program into R3 table
Hi
I wanted to insert records from report program into R3 table.
here is my code
data : itab type standard table of zemp initial size 10 with header line.
itab-EMPNO = '012'.
itab-ENAME = 'XXXX'.
itab-JOB = 'XXXX'.
APPEND itab.
insert ztable from table itab.
but i am getting the following error
the type of the data base table and work area/internal table "ITAB" are no unicode-converible.
how can I insert records from report program into R3 table
should I have to write move corresponding
pls guide
thanks
manianHi,
itab-EMPNO = '012'.
itab-ENAME = 'XXXX'.
itab-JOB = 'XXXX'.
APPEND itab.
insert ztable from table itab.
Do one thing
Data : itab type table of ztable with header line.
itab-EMPNO = '012'.
itab-ENAME = 'XXXX'.
itab-JOB = 'XXXX'.
APPEND itab.
insert ztable from table itab.
error will resolve, then try to make structure similar to ZTABLE -
Inserting records from Infopath forms library to a SQL table
Hi,
I have a requirement where i need to populate records from a Infopath forms library to a SQL table in a database. We have written a console app to achive the same. However we are encountering performance issues when inserting records in the database. The
way we retreive information from Infopath forms library is through a CAML query and then insert record by record in database. Is their a better and faster way to acheive this?
Can someone pls help?
thanks,
Anand
Thanks and Regards, Anand R. DeshpandeHello Anand,
Could you share you console application code? Also tell us when you face performance issue. I mean is there any problem in accessing infopath form or you are facing problem with only console application.
Hemendra:Yesterday is just a memory,Tomorrow we may never see
Please remember to mark the replies as answers if they help and unmark them if they provide no help -
How to insert data from APEX form into two tables
Hi,
I'm running APEX 4.1 with Oracle XE 11g, having two tables CERTIFICATES and USER_FILES. Some of the (useless) fields are cut to reduce information:
CREATE TABLE CERTIFICATES
CERT_ID NUMBER NOT NULL ,
CERT_OWNER NUMBER NOT NULL ,
CERT_VENDOR NUMBER NOT NULL ,
CERT_NAME VARCHAR2 (128) ,
CERT_FILE NUMBER NOT NULL ,
) TABLESPACE CP_DATA
LOGGING;
ALTER TABLE CERTIFICATES
ADD CONSTRAINT CERTIFICATES_PK PRIMARY KEY ( CERT_ID ) ;
CREATE TABLE USER_FILES
FILE_ID NUMBER NOT NULL ,
FILENAME VARCHAR2 (128) ,
BLOB_CONTENT BLOB ,
MIMETYPE VARCHAR2 (32) ,
LAST_UPDATE_DATE DATE
) TABLESPACE CP_FILES
LOGGING
LOB ( BLOB_CONTENT ) STORE AS SECUREFILE
TABLESPACE CP_FILES
STORAGE (
PCTINCREASE 0
MINEXTENTS 1
MAXEXTENTS UNLIMITED
FREELISTS 1
BUFFER_POOL DEFAULT
RETENTION
ENABLE STORAGE IN ROW
NOCACHE
ALTER TABLE USER_FILES
ADD CONSTRAINT CERT_FILES_PK PRIMARY KEY ( FILE_ID ) ;
ALTER TABLE CERTIFICATES
ADD CONSTRAINT CERTIFICATES_USER_FILES_FK FOREIGN KEY
CERT_FILE
REFERENCES USER_FILES
FILE_ID
NOT DEFERRABLE
What I'm trying to do is to allow users to fill out all the certificate data and upload a file in an APEX form. Once submitted the file should be uploaded in the USER_FILES table and all the fields along with CERT_ID, which is the foreign key pointing to the file in the USER_FILES table to be populated to the CERTIFICATES table. APEX wizard forms are based on one table and I'm unable to build form on both tables.
That's why I've created a view (V_CERT_FILES) on both tables and using INSTEAD OF trigger to insert/update both tables. I've done this before and updating this kind of views works perfect. Here is where the problem comes, if I'm updating the view all the data is updated correctly, but if I'm inserting into the view all the fields are populated at CERTIFICATES table, but for USER_FILES only the fields FILE_ID and LAST_UPDATE_DATE are populated. The rest three regarding the LOB are missing: BLOB_CONTENT, FILENAME, MIMETYPE. There are no errors when running this from APEX, but If I try to insert into the view from SQLDeveloper, I got this error:
ORA-22816: unsupported feature with RETURNING clause
ORA-06512: at line 1
As far as I know RETURNING clause in not supported in INSTEAD of triggers, although I didn't have any RETURNING clauses in my trigger (body is below).
Now the interesting stuff, after long tracing I found why this is happening:
First, insert is executed and the BLOB along with all its properties are uploaded to wwv_flow_file_objects$.
Then the following insert is executed to populate all the fields except the BLOB and it's properties, rowid is RETURNED, but as we know RETURNING clause is not supported in INSTEAD OF triggers, that's why I got error:
PARSE ERROR #1918608720:len=266 dep=3 uid=48 oct=2 lid=48 tim=1324569863593494 err=22816
INSERT INTO "SVE". "V_CERT_FILES" ( "CERT_ID", "CERT_OWNER", "CERT_VENDOR", "CERT_NAME", "BLOB_CONTENT") VALUES (:B1 ,:B2 ,:B3 ,:B4, ,EMPTY_BLOB()) RETURNING ROWID INTO :O0
CLOSE #1918608720:c=0,e=11,dep=3,type=0,tim=1324569863593909
EXEC #1820672032:c=3000,e=3168,p=0,cr=2,cu=4,mis=0,r=0,dep=2,og=1,plh=0,tim=1324569863593969
ERROR #43:err=22816 tim=1324569863593993
CLOSE #1820672032:c=0,e=43,dep=2,type=1,tim=1324569863594167
Next my trigger gets in action, sequences are generated, CERTIFICATES table is populated and then USER_FILES, but only the FILE_ID and LAST_UPDATE_DATE.
Finally update is fired against my view (V_CERT_FILES), reading data from wwv_flow_files it populates BLOB_CONTENT, MIMETYPE and FILENAME fields at the specific rowid in V_CERT_FILES, the one returned from the insert at the beginning. Last, file is deleted from wwv_flow_files.
I'm using sequences for the primary keys, this is only the body of the INSTEAD OF trigger:
select user_files_seq.nextval into l_file_id from dual;
select certificates_seq.nextval into l_cert_id from dual;
insert into user_files (file_id, filename, blob_content, mimetype, last_update_date) values (l_file_id, :n.filename, :n.blob_content, :n.mimetype, sysdate);
insert into certificates (cert_id, cert_owner, cert_vendor, cert_name, cert_file) values (l_cert_id, :n.cert_owner, :n.cert_vendor, :n.cert_name, l_file_id);
I'm surprised that I wasn't able to find a valuable source of information regarding this problem, only MOS note about running SQLoader against view with CLOB column and INSTEAD OF trigger. The solution would be to ran it against base table, MOS ID 795956.1.
Maybe I'm missing something and that's why I decided to share my problem here. So my question is how do you create this kind of architecture, insert into two tables with a relation between them in APEX ? I read a lot in the Internet, some advices were for creating custom form with APEX API, create a custom ARP, create two ARP or create a PL/SQL procedure for handing the DML?
Thanks in advance.
Regards,
SveThank you however I was wondering if there was an example available which uses EJB and persistence.
-
Insert data from one form to another table
I have a form which of course insert data into table1, i created a process within this form and include a sql statement to achieve this for me. My thoughts are this will take whatever is the value from the form and insert it into table2.
INSERT INTO ML_LIST (ML_TITLE,ML_LASTNAME)
VALUES
(P20_SSR_TITLE, P20_SSR_LASTNAME);
My error is column not allowed here
Any suggestionsI used the following
Begin
INSERT INTO ML_LIST (ML_TITLE,ML_LASTNAME)
VALUES
(:P20_SSR_TITLE,:P20_SSR_LASTNAME);
End; -
How to upload a collection of records from adobe form into a table in BAPI
We are creating an appliction using web dynpro and adobe that will allow users to update PO status information offline. The information is downloaded into a form and then updated offline by the vendor. After this change the form is uploaded into the application and sent to SAP R/3 via a BAPI call. The BAPI provides the information for different PO's as a table structure (many items - collection) which is downloaded into the form and displayed as a table. The download part works and we can upload the modified file also. We can even see the data getting loaded into the controller context after we upload the form.
<b>The problem</b> is when we try to execute the BAPI to upload the data. The data in the table structure does not seem to upload, only the non-table structure field values get posted back. Logs at the BAPI show "0" records uploaded. Couple of other fields which are not part of the table structure get uploaded properly.
Can someone <b>please provide some insights - help</b> on what could be going wrong. Any debugging ideas or checking logs to see if the data is really getting pushed from the webdynpro/adobe app to the R/3 system would be helpfull.
Our R/3 setup is ECC5 on a AIX server and the adobe webdynpro setup is NW04s on a different different AIX server.
ThanksHi satishsuri ,
You will have to use 3 methods together :
CALL METHOD cl_gui_frontend_services=>directory_browse "Browse the Directory
CALL METHOD cl_gui_frontend_services=>directory_list_files "Get all the files from the directory
CALL METHOD cl_gui_frontend_services=>gui_upload "Upload each file in a loop
Example:
TYPES: BEGIN OF ty_data,
line TYPE string,
END OF ty_data.
DATA: str_file TYPE string,
str_dir TYPE string,
it_file_table TYPE STANDARD TABLE OF file_info,
wa_file_table TYPE file_info,
v_count TYPE i,
it_data TYPE STANDARD TABLE OF ty_data,
wa_data TYPE ty_data.
CALL METHOD cl_gui_frontend_services=>directory_browse
CHANGING
selected_folder = str_dir.
CALL METHOD cl_gui_frontend_services=>directory_list_files
EXPORTING
directory = str_dir
CHANGING
file_table = it_file_table
count = v_count.
LOOP AT it_file_table INTO wa_file_table.
CONCATENATE str_dir wa_file_table-filename INTO str_file SEPARATED BY '\'.
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = str_file
filetype = 'ASC'
CHANGING
data_tab = it_data.
LOOP AT it_data INTO wa_data.
WRITE : / wa_data-line.
ENDLOOP.
ULINE.
ENDLOOP.
Regards,
Jovito -
Can BO Enterprize SDK inserts records into user table
From Infostore can we create a jsp script using Java SDK to inserts records into user table??
Thanks
AmarHi Amar,
I want to retrieve data/records from Infostore and insert into a user table using JSP script. Is it possible to do this?
Infostore is a database used by BO Server. so any changes made in infostore through BO enterprise session is valid.
Say u want to retrive on of report present in folder <my folder>.
The you have to query for that. for eg.
boinfostore.query("select * from ci_infoobjects where si_kind ='report' and si_foldername='my folder'");
Create/add/insert any new information in infostore is done by functionalities provide by SDK.
like adding the user or scheduling a report will add new object to infostore.
If you directly access cms database and make any changes then , I am afraid you will end up with nightmare.
So it is always recommneded to access infostore/ cms database only from bo session.
For more information refer below link
[http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/devsuite.htm]
then under Contents
BusinessObjects Enterprise SDK >> COM developer guide and API reference >> Query Language Reference
do revert if any queries
Thanks,
Praveen. -
*Urgent*How to insert data from MS SQL to the table that create at the adobe form?
Hi,
I'm using Adobe life cycle designer 8 to do my interactive form. I would like to ask how to insert data from MS SQL to the table that i have created in my adobe interactive form?
I really need the information ASAP as i need to hand in my project by next week... i really appreciate any one who reply this post.
ThanksTou need to do a couple of things
1. On the Essbase server, set up an odbc system connection to your MySQL database
2. In the load rule , go to the file menu and select open SQL data source and in the data source put in your SQL statement . A couple of hints. Where it says Select, don't put in the word select and where it say from don't put in from. The system adds them for you. The easiest way ti enter a SQL statement is to do it all in the select area So if your SQL would normanlly say select * from mytable just enter the code as * from mytable in the select area
The click ol/retrieve and enter in your connection info. Itshould bring data back into the load rule. Save the load rule and use it -
Inserting records from internal table to database table
Hi all,
i want to insert records from internal table to zDatabase table, can u plz guide me which statement is better in performance to insert the records.
1) insert one by one record from internal table
loop at itab.
insert ztable from wa.
endloop.
2) insert total records at a time
INSERT <dbtabname> CLIENT SPECIFIED FROM TABLE itab.
or let me know if any other statement is there with high performance.
i internal table contains nearly 40000 records.
thanks.Hi,
Insert the entire table at atime rather than a record so as to increase the performance.
you can use INSERT <dbtabname> CLIENT SPECIFIED FROM TABLE itab.
or
MODIFY ZPRODUCT FROM TABLE GI_AFPO.
Regards,
Raj. -
Retrive last inserted record from database table
Hi,
some body inserting a record into table 'A' through some procedure/java program.i want to retrive the last inserted record from database table.records are not stored in order.Can any body help me.In general, unless you are storing a timestamp as part of the row or you have some sort of auditing in place, Oracle has no idea what the "first" or "last" record in a table is. Nor does it track when a row was inserted.
- If you have the archived logs from the point in time when the row was inserted, you could use LogMiner to find the timestamp
- If the insert happened recently (i.e. within hours), you may be able to use flashback query to get the value
- If you're on 10g or later and the table was built with ROWDEPENDENCIES and the insert happened in the last few days and you can deal with a granularity of a few seconds and you don't need 100% accuracy, you could get the ORA_ROWSCN of the row and convert that to a timestamp.
If this is something you contemplate needing, you need to store the data in the row or set up some sort of auditing.
Justin -
Updating multiple records from single form (ASP)
I have a nested repeat region.
I have created in the parent, a form with 3 fields and an update button.
the child records all have multiple columns, 3 of which correspond to the parent.
Athe parent is bound to the child records by the shipmentID
I need to be able to update all child records from the form in the parent.
The case is this.
The child records are orders with shipdates and frequencies
The parent contains a form with fields for shipdate and frequency
The administrator needs to change the shipdate and/or frequency for all child records.
(The child records are forms as well--but that's another issue that works fine)
Shipment ID
Date Field
Freq Field
UPDATE Button
ShipmentID
Record 1
Data case1
Date
ShipmentID
Record 2
Data case 2
Date
I am doing this in classic asp with an SQL database.
So how do I get the form to update all record
[Subject title edited by moderator to make clear ASP involved]Hi,
This is one of those questions that would require far more explanation that is reasonable to expect in a forum. You should do a little poking around in the nearest Barnes & Nobles. About a half hour in a chare with a good ASP book and vanilla latte should have you on the right track.
Lawrence *Adobe Community Expert*
www.Cartweaver.com
Complete Shopping Cart Application for
Dreamweaver, available in ASP, PHP and CF -
Insert record from one table to another with help of cursor
Plz help!!!
tables are - 1. country( country_id pk, country_name, region_id)
2. a( country_id , country_name, region_id)
table a data are
1 a 1
2 b 2
3 c 3
null d 4
5 e 5
6 f 6
7 g 7
insert record from table a to country table with help of cursor, insert all not null records.
this procedure does not give correct result
create or replace
procedure amit as
cursor c1 is select * from a;
rw a%rowtype;
begin
open c1;
fetch c1 into rw;
while(c1%found)
loop
insert into countries values(rw.country_id,rw.country_name,rw.region_id);
commit;
fetch c1 into rw;
if rw.country_id is null then
fetch c1 into rw;
end if;
end loop;
close c1;
exception
when others then
dbms_output.put_line('exception name= '||rw.country_name);
end;bluefrog wrote:
You don't need cursor at all;
create or replace procedure amit as
begin
insert into countries (Country_ID, Country_Name, Region_ID)
(select a.Country_ID
,a.Country_Name
,a.Region_ID
from a
dbms_output.put_line('Rows inserted : ' || sql%rowcount);
commit;
end;
Bluefrog you missed where clause. :)
insert into countries (Country_ID, Country_Name, Region_ID)
(select a.Country_ID
,a.Country_Name
,a.Region_ID
from a
where country_id is not null
); -
Inserting records from a txt file to a database table
I would like to know how to insert records from a file (txt) to a database table through a java application?
[BufferedReader |http://java.sun.com/javase/6/docs/api/java/io/BufferedReader.html] and PreparedStatement
IO and JDBC -
Delete record from the form and from the database
hi,
i want delete record from the form and the database ,but the record is only delete from the from !!!
this is my code :
if //condition then
delete_record;
commit;
end if ;
Any solutions ??
thnxYou have unique key field(s) on the table you are trying to insert which actually restricts you from inserting the same value again.
When you are deleting the record and issue commit there is a record to be inserted in the table which is a duplicate that's why you are getting this unique error.
As oracle is not able to insert your commit fails and stops your deletion of record from table
Maybe you are looking for
-
Proforma Invoice in Stock transfer Intra company
Hi Gurus, I am trying to make Proforma Invoice in STO Intra company. But it is giving the errror "Not relevant for billing". Actually i want to create a excise Invoice from this Pro forma Invoice. I have also maintained NLN item category in Copy cont
-
I want to review content in a backup from a previous iOS device to decide whether to delete the backup from iCloud. I'm most concerned about keeping photos I took on the previous phone. Ideally, I would consolidate the photos to my current device and
-
Archiving cleared items.
Hi all, I want to remove cleared items from tables BSE_CLR, BSAK and BSAS, I used archiving object FI_DOCUMNT (that I got from transaction DB15). I was able to remove a cleared item from BSE_CLR. But entries for the same cleared item still exist in B
-
Why Won't My Captivate 2 capture all the frames in my webpage?
When I try to capture a mutliframe webpage, Captivate only captures one frame and leaves blank the other frames. Has anyone else encountered this problem? Is there any solution?
-
Pdf thumbnails in Windows 7 64bit?
How do I get my thumbnails to show up using Adobe Reader X and 64 bit Windows 7? Thanks