Forum Discussion

S_Seydel's avatar
S_Seydel
Contributor
6 years ago

JScript to JavaScript conversion and adoDB delete

Greetings,   I currently work on converting the language of my scripts from JScript to JavaScript. So far Smartbear's documentations on this topic JavaScript for JScript Users and Converting Scri...
  • shankar_r's avatar
    6 years ago

    Try this code, this may look crazy but worth a try

    function adoDelete(table, column, value)
      {
        //  Open the database connection
        var connection = openDatabaseConnection();
        //  Open the recordset we need
        var recordset = openRecordset(connection, table);
    
        //  Iterate through the recordset and delete all appropriate tupels    
        recordset.MoveFirst();
        
        while(equal(recordset.EOF, false))
        {
          if (equal(recordset.Fields.Item(column).Value, value))
          {
            recordset.Delete();
          }
          recordset.MoveNext();
        }