Title: RE : [dbforms] Problems with queryData Tag -> query attribute

I would suggest that you build your query as follows:
<%
        StringBuffer query = new StringBuffer();
        query.append("SELECT CONTRACT.ID, CUSTOMER.NAME FROM CONTRACT,CUSTOMER WHERE CUSTOMER.ID=CONTRACT.CUSTOMER_ID AND CUSTOMER.ID=");

        query.append(customerID);
%>

          <db:select fieldName="CONTRACT_ID" >
               <db:queryData     name="contractQuery"
                                 query="<%= query.toString() %>"/>
          </db:select>


Philip Grunikiewicz
Hydro-Qu�bec / Montr�al / Canada


-----Message d'origine-----
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Envoy� : jeudi 23 mai 2002 04:58
� : [EMAIL PROTECTED]
Objet : [dbforms] Problems with queryData Tag -> query attribute



It is stated that the query attribute of queryData is RunTimeExpression.

It is expected that following piece of JSP should work:

          <db:select fieldName="CONTRACT_ID" >
               <db:queryData     name="contractQuery"
                                 query="SELECT CONTRACT.ID, CUSTOMER.NAME FROM CONTRACT,CUSTOMER WHERE CUSTOMER.ID=CONTRACT.CUSTOMER_ID AND CUSTOMER.ID=<%= customerID %>"

               />
          </db:select>
The problem is that the scriptlet is not evaluated and <%= customerID %> is passed in the request to the DB server instead of its value (50).

It is not possible to use workaround, because this is used in "create form" (receiver of the navNew event). It will be nice if the problem is fixed. greetings Ivo


_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

_______________________________________________
DbForms Mailing List

http://www.wap-force.net/dbforms

Reply via email to