Transaction Macros Fail

The question is simple: Why the following code in a blank application is inserting the record to the database?

 sc_begin_trans();
  
  $value = 1;
  
  $insert_st="INSERT INTO TABLE (COL1,COL2,COL3) VALUES (1,2,'TEXT')";
  sc_exec_sql($insert_st);
  
  if($value ==0) {
  
       sc_commit_trans();
  }
  else {
  
       sc_rollback_trans();
  
  }
 

My server is running on Centos 6. Scriptcase 9 was installed with auto installer and connection with MSSQLServer configured according to the documentation available in Scriptcase WebHelp.

Firstly, I had this problem in a multi record form. Some records where inserted into another table despite the fact that I had a check that was supposed to roll back the entire transaction when an error occurs, but no success. Then I tried running the simple script showed in this post, and I can see transaction macros are not doing their job. Why???