home *** CD-ROM | disk | FTP | other *** search
/ Practical Internet Web Designer 86 / PIWD86.iso / pc / contents / dreamweaver / software / dwmx2004.exe / Disk1 / data1.cab / Configuration_En / Commands / ServerBeh-CF-AdvRS.js < prev    next >
Encoding:
JavaScript  |  2003-09-05  |  18.4 KB  |  678 lines

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