Deleting records in a database v8.0.2.1
You can use the ExecuteNonQuery()
method of EDBCommand
to delete records from a database stored on an EDB Postgres Advanced Server host with a DELETE
statement.
In the example that follows, the DELETE
command is stored in the variable strDeleteQuery
. The code passes the employee number specified by EmpNo
to the DELETE
command. The command is then executed using the ExecuteNonQuery()
method.
Save the sample code in a file named deleteEmployee.aspx
in a web root directory.
To invoke the sample code, enter the following in a browser: http://localhost/deleteEmployee.aspx