home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 July / 07_02.iso / software / mdmx / files / DreamweaverMXInstaller.exe / Disk1 / data1.cab / Configuration_En / Commands / ServerBeh-CF-AdvRS.js < prev    next >
Encoding:
JavaScript  |  2002-05-01  |  18.3 KB  |  679 lines

  1. // Copyright 2002 Macromedia, Inc. All rights reserved.
  2.  
  3.  
  4. // *************** GLOBALS VARS *****************
  5.  
  6. var helpDoc = MM.HELP_ssCFAdvancedRecordset;
  7.  
  8.  
  9. var RECORDSET_SBOBJ;  // SBRecordset argument to the command.
  10. var CMD_FILENAME_SIMPLE; // Command filename for simple recorset dialog.
  11.  
  12. var _RecordsetName = new TextField("Recordset.htm", "RecordsetName");
  13. var _ConnectionName = new CFDataSourceMenu("Recordset.htm", "ConnectionName");
  14. var _SQL = new TextField("Recordset.htm", "SQL");
  15. var _UserName = new TextField("Recordset.htm", "UserName");
  16. var _Password = new TextField("Recordset.htm", "Password");
  17. var _ParamList = new ListControl("ParamList");
  18. var _DBTree = null;
  19. var _SelectBtn = null;
  20. var _WhereBtn = null;
  21. var _OrderByBtn = null;
  22. var _PlusBtn = null;
  23. var _MinusBtn = null;
  24. var _ParamName = null;
  25. var _ParamDefault = null;
  26. var _ParamEditBtn = null;
  27.  
  28. var sqlObject = null;
  29.  
  30. var G_BtnDelOff = "../Shared/UltraDev/Images/MinusButtonDisabled.gif";
  31. var G_BtnAddOff = "../Shared/UltraDev/Images/PlusButtonDisabled.gif";
  32.  
  33. var G_BtnDelOn = "../Shared/UltraDev/Images/MinusButtonEnabled.gif";
  34. var G_BtnAddOn = "../Shared/UltraDev/Images/PlusButton.gif";
  35.  
  36. var VARPROP_WIDTH_PX = 190;
  37.  
  38. // ******************* API **********************
  39.  
  40. //--------------------------------------------------------------------
  41. // FUNCTION:
  42. //   commandButtons
  43. //
  44. // DESCRIPTION:
  45. //   Returns the list of buttons which should appear on the right hand
  46. //   side of the dialog
  47. //
  48. // ARGUMENTS:
  49. //   none
  50. //
  51. // RETURNS:
  52. //   Array - pairs of button name and function call
  53. //--------------------------------------------------------------------
  54.  
  55. function commandButtons()
  56. {
  57.   return new Array(MM.BTN_OK,     "clickedOK()", 
  58.                    MM.BTN_Cancel, "clickedCancel()", 
  59.                    MM.BTN_Test,   "clickedTest()", 
  60.                    MM.BTN_Simple, "clickedSimple()", 
  61.                    MM.BTN_Help,   "displayHelp()"); 
  62. }
  63.  
  64.  
  65. //--------------------------------------------------------------------
  66. // FUNCTION:
  67. //   clickedOK
  68. //
  69. // DESCRIPTION:
  70. //   This function is called when the user clicks OK
  71. //
  72. // ARGUMENTS:
  73. //   none
  74. //
  75. // RETURNS:
  76. //   nothing
  77. //--------------------------------------------------------------------
  78.  
  79. function clickedOK()
  80. {
  81.   // Update RECORDSET_SBOBJ from the UI.
  82.   updateSBRecordsetObject();
  83.   recordsetDialog.onClickOK(window, RECORDSET_SBOBJ);
  84. }
  85.  
  86.  
  87. //--------------------------------------------------------------------
  88. // FUNCTION:
  89. //   clickedCancel
  90. //
  91. // DESCRIPTION:
  92. //   This function is called when CANCEL is clicked
  93. //
  94. // ARGUMENTS:
  95. //   none
  96. //
  97. // RETURNS:
  98. //   nothing
  99. //--------------------------------------------------------------------
  100.  
  101. function clickedCancel()
  102. {
  103.   recordsetDialog.onClickCancel(window);
  104. }
  105.  
  106.  
  107. //--------------------------------------------------------------------
  108. // FUNCTION:
  109. //   clickedTest
  110. //
  111. // DESCRIPTION:
  112. //   This function is called when the user clicks the TEST button
  113. //
  114. // ARGUMENTS:
  115. //   none
  116. //
  117. // RETURNS:
  118. //   nothing
  119. //--------------------------------------------------------------------
  120.  
  121. function clickedTest()
  122. {
  123.   // Update RECORDSET_SBOBJ from the UI.
  124.   updateSBRecordsetObject();
  125.   
  126.   if (!RECORDSET_SBOBJ.checkData(true))
  127.   {
  128.     alert(RECORDSET_SBOBJ.getErrorMessage());
  129.     return;
  130.   }
  131.  
  132.   var theSQL = RECORDSET_SBOBJ.getSQLForTest();
  133.   
  134.   if (theSQL)
  135.   {
  136.     MMDB.showResultset(dwscripts.getCFDataSourceName(RECORDSET_SBOBJ.getConnectionName()), theSQL);
  137.   }
  138. }
  139.  
  140.  
  141. //--------------------------------------------------------------------
  142. // FUNCTION:
  143. //   clickedSimple
  144. //
  145. // DESCRIPTION:
  146. //   This function is called when the user clicks the SIMPLE button
  147. //
  148. // ARGUMENTS:
  149. //   none
  150. //
  151. // RETURNS:
  152. //   nothing
  153. //--------------------------------------------------------------------
  154.  
  155. function clickedSimple()
  156. {
  157.  
  158.   // Update RECORDSET_SBOBJ from the UI.
  159.   updateSBRecordsetObject();
  160.   recordsetDialog.onClickSwitchUI(window, recordsetDialog.UI_ACTION_SWITCH_SIMPLE, 
  161.                                   RECORDSET_SBOBJ, CMD_FILENAME_SIMPLE);
  162. }
  163.  
  164.  
  165. //--------------------------------------------------------------------
  166. // FUNCTION:
  167. //   displayHelp
  168. //
  169. // DESCRIPTION:
  170. //   This function is called when the user clicks the HELP button
  171. //
  172. // ARGUMENTS:
  173. //   none
  174. //
  175. // RETURNS:
  176. //   nothing
  177. //--------------------------------------------------------------------
  178.  
  179. function displayHelp()
  180. {
  181.   dwscripts.displayDWHelp(helpDoc);
  182. }
  183.  
  184.  
  185. // ***************** LOCAL FUNCTIONS  ******************
  186.  
  187. //--------------------------------------------------------------------
  188. // FUNCTION:
  189. //   initializeUI
  190. //
  191. // DESCRIPTION:
  192. //   This function is called in the onLoad event.  It is responsible
  193. //   for initializing the UI.  If we are inserting a recordset, this
  194. //   is a matter of populating the connection drop down.
  195. //
  196. //   If we are modifying a recordset, this is a matter of inspecting
  197. //   the recordset tag and setting all the form elements.
  198. //
  199. // ARGUMENTS:
  200. //   none
  201. //
  202. // RETURNS:
  203. //   nothing
  204. //--------------------------------------------------------------------
  205.  
  206. function initializeUI()
  207. {
  208.   var setConnectionSuccess = true;  // return value from connectionmenu's initializeUI() 
  209.   var args = dwscripts.getCommandArguments();
  210.   RECORDSET_SBOBJ = args[0];
  211.   CMD_FILENAME_SIMPLE = args[1];
  212.   
  213.   // Get the UI elements
  214.   _RecordsetName.initializeUI();
  215.   setConnectionSuccess = _ConnectionName.initializeUI();
  216.    
  217.   _SQL.initializeUI();
  218.   _UserName.initializeUI(); 
  219.   _Password.initializeUI(); 
  220.  
  221.   // _ParamList = new GridControl("ParamList");
  222.   _DBTree = new DatabaseTreeControl("DBTree");
  223.  
  224.   // initialize the controls
  225.   _SelectBtn = dwscripts.findDOMObject("SelectButton"); 
  226.   _WhereBtn = dwscripts.findDOMObject("WhereButton"); 
  227.   _OrderByBtn = dwscripts.findDOMObject("OrderByButton"); 
  228.   _PlusBtn = dwscripts.findDOMObject("plusButton"); 
  229.   _MinusBtn = dwscripts.findDOMObject("minusButton"); 
  230.   _ParamName = dwscripts.findDOMObject("ParamName"); 
  231.   _ParamDefault = dwscripts.findDOMObject("ParamDefault"); 
  232.   _ParamEditBtn = dwscripts.findDOMObject("EditCFParam"); 
  233.   
  234.   var rsName = RECORDSET_SBOBJ.getRecordsetName();
  235.   if (!rsName)
  236.   {
  237.     rsName = RECORDSET_SBOBJ.getUniqueRecordsetName();
  238.   }
  239.   _RecordsetName.setValue(rsName);
  240.   _UserName.setValue(RECORDSET_SBOBJ.getUserName()); 
  241.   _Password.setValue(RECORDSET_SBOBJ.getPassword());
  242.     
  243.   // set the readonly param properties
  244.   _ParamName.innerHTML = dwscripts.entityNameEncode(MM.LABEL_ParamAttributesName);
  245.   _ParamDefault.innerHTML = dwscripts.entityNameEncode(MM.LABEL_ParamAttributesDefault);
  246.  
  247.   // If no value is defined for username, initialize user name control to empty string
  248.   if (_UserName.getValue() == "null")
  249.   {
  250.     _UserName.setValue(""); 
  251.   }  
  252.   
  253.   // If no value is defined for password, initialize password control to empty string
  254.   if (_Password.getValue() == "null")
  255.   {
  256.     _Password.setValue(""); 
  257.   }
  258.   
  259.   var connectionName = RECORDSET_SBOBJ.getConnectionName();
  260.   if (connectionName)
  261.   {
  262.     _ConnectionName.pickName(RECORDSET_SBOBJ.getConnectionName());
  263.   }
  264.   
  265.   var sqlParams = new Array();
  266.   var sqlString = RECORDSET_SBOBJ.getDatabaseCall(sqlParams);
  267.   if (sqlString)
  268.   {
  269.     sqlObject = new SQLStatement(sqlString);
  270.     if (sqlObject.getType() != SQLStatement.STMT_TYPE_UNKNOWN)
  271.     {
  272.       sqlObject.formatStatement();
  273.       _SQL.setValue(sqlObject.getStatement());
  274.     }
  275.     else
  276.     {
  277.       _SQL.setValue(sqlString);
  278.     }
  279.   }
  280.   else
  281.   {
  282.     sqlObject = new SQLStatement("");
  283.   }
  284.   
  285.   var varNames = new Array();
  286.   var varDefaults = new Array();  
  287.   var count = sqlParams.length;
  288.   for (var i=0; i < count; i++)
  289.   {
  290.     var param = sqlParams[i];
  291.     varNames.push(param.varName);
  292.     varDefaults.push(param.varDefault);
  293.   }
  294.   _ParamList.setAll(varNames, varDefaults);
  295.   updateCFParamProperties(); 
  296.   setParamEditButtonState(); 
  297.  
  298.   elts = document.forms[0].elements;
  299.   if (elts && elts.length)
  300.   {
  301.     elts[0].focus();
  302.     elts[0].select();
  303.   }
  304. }
  305.  
  306.  
  307. //--------------------------------------------------------------------
  308. // FUNCTION:
  309. //   updateUI
  310. //
  311. // DESCRIPTION:
  312. //   This function is called by the UI controls to handle UI updates
  313. //
  314. // ARGUMENTS:
  315. //   control - string - the name of the control sending the event
  316. //   event - string - the event which is being sent
  317. //
  318. // RETURNS:
  319. //   nothing
  320. //--------------------------------------------------------------------
  321.  
  322. function updateUI(control, event)
  323. {
  324.  
  325.   if (control == "ConnectionName")
  326.   {
  327.     // check the connection, and get a username and password if needed
  328.     _ConnectionName.ensureLogin(RECORDSET_SBOBJ.getUserName(),
  329.                                 RECORDSET_SBOBJ.getPassword());
  330.  
  331.     if (event == "onChange")
  332.     {
  333.       // set the username and password for this data source
  334.       _UserName.setValue(_ConnectionName.getUsername());
  335.       _Password.setValue(_ConnectionName.getPassword());
  336.     }
  337.     
  338.     // update the database tree
  339.     _DBTree.setConnection(_ConnectionName.getValue());
  340.   }
  341.   else if (control == "DBTree")
  342.   {
  343.     setUIDisabledStateForCFSP(); 
  344.   }
  345.   else if (control == "SelectButton")
  346.   {
  347.     sqlObject.setStatement(_SQL.getValue());
  348.     var sqlType = sqlObject.getType();
  349.     
  350.     var dbInfo = _DBTree.getSelectedData();
  351.     
  352.     if (!dbInfo)
  353.     {
  354.       alert(MM.MSG_InvalidSelectionCF);
  355.     }
  356.     else if ((sqlType == SQLStatement.STMT_TYPE_SELECT ||
  357.               sqlType == SQLStatement.STMT_TYPE_EMPTY) &&
  358.              (dbInfo.isTable() || dbInfo.isColumn()))
  359.     {
  360.       sqlObject.addFrom(dbInfo.table);
  361.       if (dbInfo.isColumn())
  362.       {
  363.         sqlObject.addSelect(dbInfo.table, dbInfo.column);
  364.       }
  365.  
  366.       _SQL.setValue(sqlObject.getStatement());
  367.     }
  368.     else if (dbInfo.isProcedure())
  369.     {
  370.       var sql = getStoredProcedureSQL(dbInfo.procedure, dbInfo.paramArray);
  371.  
  372.       if (sql)
  373.       {
  374.         _SQL.setValue(sql);
  375.       }
  376.     }
  377.     else
  378.     {
  379.       alert(MM.MSG_CanOnlyUseButtonsOnSelectStatements);
  380.     }
  381.   }
  382.   else if (control == "WhereButton")
  383.   {
  384.     sqlObject.setStatement(_SQL.getValue());
  385.     if (sqlObject.getType() == SQLStatement.STMT_TYPE_SELECT)
  386.     {
  387.       var dbInfo = _DBTree.getSelectedData();
  388.  
  389.       if ( dbInfo && dbInfo.isColumn() )
  390.       {
  391.         sqlObject.addWhere(dbInfo.table, dbInfo.column);
  392.         _SQL.setValue(sqlObject.getStatement());
  393.       }
  394.     }
  395.     else if (sqlObject.getType() != SQLStatement.STMT_TYPE_EMPTY)
  396.     {
  397.       alert(MM.MSG_CanOnlyUseButtonsOnSelectStatements);
  398.     }
  399.   }
  400.   else if (control == "OrderByButton")
  401.   {
  402.     sqlObject.setStatement(_SQL.getValue());
  403.     if (sqlObject.getType() == SQLStatement.STMT_TYPE_SELECT)
  404.     {
  405.       var dbInfo = _DBTree.getSelectedData();
  406.  
  407.       if ( dbInfo && dbInfo.isColumn() )
  408.       {
  409.         sqlObject.addOrderBy(dbInfo.table, dbInfo.column);
  410.         _SQL.setValue(sqlObject.getStatement());
  411.       }
  412.     }
  413.     else if (sqlObject.getType() != SQLStatement.STMT_TYPE_EMPTY)
  414.     {
  415.       alert(MM.MSG_CanOnlyUseButtonsOnSelectStatements);
  416.     }
  417.   }
  418.   else if (control == "SQL")
  419.   {
  420.   }  
  421.   else if (control == "plusButton")
  422.   {
  423.     var variableRefs = new Array();
  424.     RECORDSET_SBOBJ.decodeVarRefs(_SQL.getValue(), variableRefs);
  425.     var cmdArgs = new Array();
  426.     cmdArgs[0] = false;
  427.     cmdArgs[1] = variableRefs;
  428.     cmdArgs[2] = "";
  429.     cmdArgs[3] = "";
  430.     var addParamResult = dwscripts.callCommand("Add CF Parameter", cmdArgs);    
  431.     if (addParamResult && addParamResult.length && addParamResult[0])
  432.     {
  433.       var existingParams = _ParamList.get('all');
  434.       var indexOfParam = dwscripts.findInArray(existingParams, addParamResult[0]);
  435.       if (indexOfParam != -1)
  436.       {
  437.         if (confirm(dwscripts.sprintf(MM.MSG_ParameterAlreadyDefined, addParamResult[0])))
  438.         {
  439.           _ParamList.setValue(addParamResult[1], indexOfParam);
  440.         }
  441.       }
  442.       else
  443.       {
  444.         _ParamList.append(addParamResult[0],addParamResult[1]);
  445.       }
  446.       updateCFParamProperties(); 
  447.       setParamEditButtonState(); 
  448.     }
  449.   }
  450.   else if (control == "minusButton")
  451.   {
  452.     _ParamList.del();
  453.     updateCFParamProperties(); 
  454.     setParamEditButtonState(); 
  455.   }
  456.   else if (control == "editCFParam")
  457.   {
  458.     var cmdArgs = new Array();
  459.     cmdArgs[0] = true;
  460.     cmdArgs[1] = null;
  461.     cmdArgs[2] = _ParamList.get();
  462.     cmdArgs[3] = _ParamList.getValue();
  463.     var editParamResult = dwscripts.callCommand("Edit CF Parameter", cmdArgs);            
  464.     if (editParamResult && editParamResult.length)
  465.     {
  466.       _ParamList.setValue(editParamResult[1]);
  467.       updateCFParamProperties(); 
  468.       setParamEditButtonState(); 
  469.     }
  470.   }
  471.   else if (control == "ParamList")
  472.   {
  473.     setParamEditButtonState(); 
  474.     updateCFParamProperties();
  475.   }
  476. }
  477.  
  478.  
  479. //--------------------------------------------------------------------
  480. // FUNCTION:
  481. //   updateSBRecordsetObject
  482. //
  483. // DESCRIPTION:
  484. //   Collects information from the UI and sets the SBRecordset object
  485. //
  486. // ARGUMENTS:
  487. //   none
  488. //
  489. // RETURNS:
  490. //   boolean - true if successful, false otherwise
  491. //--------------------------------------------------------------------
  492.  
  493. function updateSBRecordsetObject()
  494. {
  495.   RECORDSET_SBOBJ.setRecordsetName(_RecordsetName.getValue());
  496.   RECORDSET_SBOBJ.setConnectionName(_ConnectionName.getName());
  497.   RECORDSET_SBOBJ.setUserName(_UserName.getValue());
  498.   RECORDSET_SBOBJ.setPassword(_Password.getValue());
  499.  
  500.   var sqlParams = new Array();
  501.  
  502.   var varNames = _ParamList.get('all');
  503.   var varDefaults = _ParamList.getValue('all');
  504.   for (var i=0; i < varNames.length; i++)
  505.   {
  506.     var param = new Object();
  507.     param.varName = varNames[i];
  508.     param.varDefault = varDefaults[i];
  509.     sqlParams.push(param);
  510.   }
  511.   
  512.   RECORDSET_SBOBJ.setDatabaseCall(_SQL.getValue(), sqlParams);
  513. }
  514.  
  515.  
  516. //--------------------------------------------------------------------
  517. // FUNCTION:
  518. //   setUIStateForCFSP
  519. //
  520. // DESCRIPTION:
  521. //   Determines whether a stored procedure item has been selected in the 
  522. //   DBTree control. If it has, disable the SQL buttons (select, where, orderby)
  523. //   and also set the plus/minus button be disabled. Otherwise, maintain 
  524. //   the default state of the dialog where these controls are enabled. 
  525. //
  526. // ARGUMENTS:
  527. //   none
  528. //
  529. // RETURNS:
  530. //   none
  531. //--------------------------------------------------------------------
  532.  
  533. function setUIDisabledStateForCFSP()
  534. {
  535.   var dbTreeInfo = _DBTree.getSelectedData(); 
  536.   var CFStoredProcWarnNode = dwscripts.findDOMObject("CFStoredProcWarning"); 
  537.  
  538.   if (dbTreeInfo.isProcedure())
  539.   {
  540.     _SelectBtn.setAttribute("value", MM.LABEL_AddProc);
  541.     _WhereBtn.setAttribute("disabled", "true");     
  542.     _OrderByBtn.setAttribute("disabled", "true"); 
  543.     _PlusBtn.src = G_BtnAddOff; 
  544.     _MinusBtn.src = G_BtnDelOff; 
  545.  
  546.     CFStoredProcWarnNode.innerHTML = dwscripts.entityNameEncode(MM.MSG_StoredProcWarning); 
  547.   }
  548.   else 
  549.   {
  550.     _SelectBtn.setAttribute("value", MM.LABEL_AddSelect);
  551.     _WhereBtn.removeAttribute("disabled");     
  552.     _OrderByBtn.removeAttribute("disabled");   
  553.     _PlusBtn.src = G_BtnAddOn;
  554.     _MinusBtn.src = G_BtnDelOn; 
  555.     CFStoredProcWarnNode.innerHTML = ""; 
  556.   }
  557. }
  558.  
  559.  
  560. //--------------------------------------------------------------------
  561. // FUNCTION:
  562. //   updateCFParamProperties
  563. //
  564. // DESCRIPTION:
  565. //   Updates the name and default read only display values if there 
  566. //   is a parameter selected in the list control 
  567. //
  568. // ARGUMENTS:
  569. //   none
  570. //
  571. // RETURNS:
  572. //   nothing
  573. //--------------------------------------------------------------------
  574.  
  575. function updateCFParamProperties()
  576. {
  577.   var selParamName = (_ParamList.get()) ? _ParamList.get() : ""; 
  578.   var selParamDefault = (_ParamList.getValue()) ? _ParamList.getValue() : "";
  579.  
  580.   var shortParamName = dw.shortenString(MM.LABEL_ParamAttributesName + selParamName, 
  581.                                         VARPROP_WIDTH_PX, false);
  582.   _ParamName.innerHTML = dwscripts.entityNameEncode(shortParamName);
  583.   var shortParamDefault = dw.shortenString(MM.LABEL_ParamAttributesDefault + selParamDefault, 
  584.                                            VARPROP_WIDTH_PX, false);
  585.   _ParamDefault.innerHTML = dwscripts.entityNameEncode(shortParamDefault);
  586. }
  587.  
  588.  
  589. //--------------------------------------------------------------------
  590. // FUNCTION:
  591. //   setParamEditButtonState
  592. //
  593. // DESCRIPTION:
  594. //   Sets the param edit button to be enabled or disabled depending
  595. //   on whether there is a selected parameter
  596. //
  597. // ARGUMENTS:
  598. //   none
  599. //
  600. // RETURNS:
  601. //   nothing
  602. //--------------------------------------------------------------------
  603.  
  604. function setParamEditButtonState()
  605. {
  606.   if (_ParamList.get()){
  607.     _ParamEditBtn.removeAttribute("disabled");   
  608.   }
  609.   else 
  610.   {
  611.     _ParamEditBtn.setAttribute("disabled","disabled"); 
  612.   }
  613. }
  614.  
  615.  
  616. //--------------------------------------------------------------------
  617. // FUNCTION:
  618. //   getStoredProcedureSQL
  619. //
  620. // DESCRIPTION:
  621. //   This method builds the SQL statment when a stored procedure is
  622. //   selected in the tree.
  623. //
  624. // ARGUMENTS:
  625. //   procedureName - string - name of the stored procedure
  626. //   paramList - array - list of stored proc parameters returned
  627. //     from the db tree control class
  628. //
  629. // RETURNS:
  630. //   string
  631. //--------------------------------------------------------------------
  632.  
  633. function getStoredProcedureSQL(procedureName, paramList)
  634. {
  635.   var retVal = "";
  636.   
  637.   var sqlObject = new SQLStatement();
  638.   
  639.   sqlObject.setCommand("call");
  640.   sqlObject.setSPName(procedureName);
  641.   
  642.   if (paramList)
  643.   {
  644.     for (var i=0; i < paramList.length; i++)
  645.     {
  646.       var paramName = dwscripts.stripChars(paramList[i].name, "@");
  647.  
  648.       var stype   = dwscripts.getDBColumnTypeAsString(paramList[i].type)
  649.       var bString = dwscripts.isStringDBColumnType(paramList[i].type);
  650.       var bBinary = dwscripts.isBinaryDBColumnType(paramList[i].type);
  651.  
  652.       if (paramName.toUpperCase() != "RETURN_VALUE")
  653.       {
  654.         if (bString)
  655.         {
  656.           sqlObject.addParam("'#" + paramName + "#'");
  657.         }
  658.         else
  659.         {
  660.           if (stype.toUpperCase() == "REF CURSOR" || bBinary)
  661.           {
  662.             sqlObject.addParam("?");
  663.           }
  664.           else
  665.           {
  666.             sqlObject.addParam("#" + paramName + "#");
  667.           }
  668.         }
  669.       }
  670.     }
  671.   }
  672.   
  673.   retVal = sqlObject.getStatement();
  674.   
  675.   return retVal;
  676. }
  677.  
  678.  
  679.