Search code examples
javascriptsmartclient

launch a SQL query from the js file


in my JS file I need to do a search on the DB (select * from table where condition) and store the result in an array(multidimensional) do you have an idea how to do it ? thank you in advance


Solution

  • the best solution is to use the dataSource files using the <customSQL> tag , here is an example:

      <operationBindings>
          <operationBinding operationType="fetch">
             <customSQL>
             SELECT  Name, Adress, Phone, Age                       
            FROM tableName
                where Age >20
    
               </customSQL>
         </operationBinding>
      </operationBindings>