[TestOptimal] execSQL Tag

TestOptimal   Wiki Home   Support  

Use execSQL tag (rel 3.0) to execute an SQL statement. The statement can be an update, insert, delete or a stored procedure call but it can not be a select statement. To execute a select statement, use dataset tag.

The following are a few examples of how to use this tag:

   <execSQL db="myDB">
      <sql>
         UPDATE myTable
            SET test_case_status = "passed"
            WHERE test_case_nbr = 201
      </sql>
   </execSQL>
   <execSQL db="myDB">
      <sql>
         INSERT INTO myTable (test_case_nbr, test_case_status)
            VALUES (201, "passed")
      </sql>
   </execSQL>
   <execSQL db="myDB">
      <sql>
         {call addTestCaseResult (201, "passe) }
      </sql>
   </execSQL>

If your db requires use of single quote to enclose the string, use [quot] instead. [quot] will be replaced with a single quote before the statement is sent to the database.


Page locked (last edited April 12, 2010) [info] [diff])
FindPage by browsing or searching
5 best incoming links: mScriptTags (11), RecentChanges (1)
5 best outgoing links: datasetTag (15)
5 most popular nearby: RecentChanges (860), mScriptTags (525), datasetTag (282)