Using CitectSCADA > Exchanging Data with Other Applications > Using ODBC drivers > Deleting rows from an Access table

Deleting rows from an Access table

The DELETE keyword is used with a WHERE clause to delete the necessary row or rows. If the WHERE clause is not based on a primary key, more than one record may be deleted.

Function SQLDelete
INT hSQL, iResult;
hSQL = SQLConnect("DSN=ODBCTest;UID=YourUID_C;PWD=YourPWD");
IF hSQL <> -1 Then
iResult = SQLExec(hSQL, "DELETE FROM tblRecipes WHERE Recipe = 'X1234'");
SQLDisconnect(hSQL);
END
END

See Also