cancel
Showing results for 
Search instead for 
Did you mean: 

sending data from browser to MII transaction

shaji_chandran
Participant
0 Kudos

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

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

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

Former Member
0 Kudos

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();

agentry_src
Active Contributor
0 Kudos

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