on 02-28-2011 10:10 AM
Hi,
I have created an IRPT page with a form where user will be feeding some data. I would like to store this data in the database. Currently I am creating an applet in the IRPT page with a xacute query. I will set the data to this xacute Query which will invoke a MII transaction. This xacute query will pass the data to MII transaction using input variable of the transaction and this transaction store the data in the database. This is the current logic which I am using. I would like to know is this the right logic for my requirement. Is there any other good logic apart from this?
Please let me know. Thanks in advance
Shaji
Hey,
The logic is correct and the easiest to use. Remember this is a syncronous process so the second you call the executeCommand function javascript will stop and wait for the transaction to complete.
If it takes a long time you may want to take an asyncronous approch and uss the HTTPRequest object and call the MII Transaction runner.
http://server/XMII/Runner?Transaction=/CM/. . . &Input1=abc&input2=123&OutputParameter=output1
Jasper
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Your logic is correct.
But ,directly using icommand is more practical.
Regards.
Sample applet
<APPLET NAME="appl_insert" CODEBASE="/XMII/Classes" CODE="iCommand" ARCHIVE="illum8.zip" WIDTH="1" HEIGHT="1" MAYSCRIPT style="visibility:hidden">
<PARAM NAME = "QueryTemplate" VALUE="..../SQL_Insert">
<PARAM NAME = "DisplayTemplate" VALUE="...../icmd">
<PARAM NAME="CreationEvent" VALUE="syncApplets">
</APPLET>
You can set the parameters like below
appl_insert.getQueryObject().setParam(1,some value1);
appl_insert.getQueryObject().setParam(2,some value2);
you can execute command like below to insert into databasu
appl_Insert.executeCommand();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Shaji,
Without more specific details on the data and its subsequent use, what you outlined sounds fine.
If your data is all going to a single table, you may want to use the iCommand applet and instead of an xacute query, just use a single insert SQL Query. It depends on what you are trying to do.
Regards,
Mike
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
12 | |
7 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.