on 11-06-2007 3:32 AM
Hi Experts,
Am having a SQL query template for which am passing value from web page after user input and i have added this SQL in my BLS transaction in illumSQL action block. I have created Xacute query template and display template(iGrid) for displaying output from transaction.
Problem am facing is that am not able to execute my transaction after passing values to SQL query. How to get this working?
Regards,
Ravi Shankar
Did u use iCommand for this case?
document.<Applet>.executeCommand(); which will execute the BLS thru Xacute Query.
Of course, before trying this u should refer the help documents where everything is available to get understanding.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
in the web page, u hv an applet which has that iGrid display template as well as XacuteQuery which gets the data from BLS by executing.
For example,
<APPLET NAME="MyApplet" WIDTH="200" HEIGHT="19" CODE="iGrid" CODEBASE="/Illuminator/Classes" ARCHIVE="illum8.zip" MAYSCRIPT>
<PARAM NAME="QueryTemplate" VALUE="<YourQueryTemplateLocationPath>">
<PARAM NAME="DisplayTemplate" VALUE="<YourDisplayTemplateLocationPath>">
<PARAM NAME="InitialUpdate" VALUE="false">
</APPLET>
Now to execute that, u should hv this javascript code as follows
document.MyApplet.getQueryObject().setParam(1. <YourInputParameter>);
document.MyApplet.updateGrid(true);
Hi som sarkar and jeremy thanks for your replies,
Solution works good in normal situation, in my case am passing values to SQL query template and then i want to updte the grid...even following the flow am not able to get the result from transaction.
i think sql query template accepts parameters, or is there anything i should know while passing values.
Regards
Ravi shankar
well, forget passing values from webpage.
first test ur BLS by passing the values with Transaction Properties and execute (Hit F6) to check the expected result. (Use Tracer Action to check the result)
If this is fine, then Test the XacuteQuery of the same BLS from Query Template Editor with parameters assigned in the Input Parameters
If this is fine, then check our suggestions as per given in previous posts
Hi som sarkar,
Let me explain my problem this way, let say am having SQL Fixed query and am doing some field selection based on the parameter which is been passed to the query template.
-Checked the query template returning values, working good.
created one Display template to display whatever been fetched by query template(iGrid).
-Generated applet working good.
Now if i pass the parameters from webpage to SQL query(parametes are mapped in query template) and update the grid, it should work right but its not...
Thats what i was trying to ask you so far.
Regards,
Ravi Shankar
APPLET NAME="WorkCenter1" CODEBASE="/Illuminator/Classes" CODE="iGrid" ARCHIVE="illum8.zip" MAYSCRIPT style="width: 88px; height: 43px;">
<PARAM NAME="QueryTemplate" VALUE="Demo/QueryTemplates/Work_Center1">
<PARAM NAME="DisplayTemplate" VALUE="Demo/DisplayTemplates/WorkCenter1_Display">
</APPLET>
document.WorkCenter1.getQueryObject.setParam(1, order);
document.WorkCenter1.updateGrid(true);
where am getting the order number from user.
Regards
Ravi shankar.
Dont assume that fault syntax will run in some cases and will not run in some other some cases. Always use same proper syntax in all cases.
In the applet tags, did u hv set the InitialUpdate as False as follows
APPLET NAME="WorkCenter1" CODEBASE="/Illuminator/Classes" CODE="iGrid" ARCHIVE="illum8.zip" MAYSCRIPT style="width: 88px; height: 43px;">
<PARAM NAME="QueryTemplate" VALUE="Demo/QueryTemplates/Work_Center1">
<PARAM NAME="DisplayTemplate" VALUE="Demo/DisplayTemplates/WorkCenter1_Display">
<b><PARAM NAME="InitialUpdate" VALUE="false"></b>
</APPLET>
One thing, wat do u hv the xml when Right-Click on the Grid Applet > Show Data Details? No Data Available? or wat?
Hi som sarkar,
I finally got what is going wrong, it is with fixed query. While filtering the query fetch i have given something like orderno = '[Param.1]', this gives result when you test it from query template. But its not accepting any values. So i just tried giving parameter like this orderno = [Param.1] (without single quotes). And its working, i dont know thats the right way of doing it. But that was the problem.
Regards
Ravi shankar
Hi,
check the data type of orderno column....
for varchar single quote will work
for int and float you have to give with out single quote
If you have time please check the following steps
1. Create the query template
2. call this query template into transaction. Create the transaction properties for parameters and an xml output.
3. link the parameters in the illumSQL query action block.
For example transaction.OrderNo = illumSQLQuery_0.Param.1
asign the results to the xml output
4. call this transaction in xacute query template
5. in the input param tab assign the transaction property as the param.1
Now set the param through java script and update the grid.
Regards,
Kishore
User | Count |
---|---|
11 | |
6 | |
1 | |
1 | |
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.