Changing an Oracle Database

The following examples involve setting up a similar connection as found before for just querying the database. The execute command is still used to pass the SQL query to the database, the only difference is that it uses either an INSERT, UPDATE or DELETE command, rather than a SELECT statement. Unlike the Access example, the write permissions to the database do not have to be set, instead the access rights already set by the DBA are enforced.

Inserting New Data

As with the Access example, to insert data into the DEPT table, involves the three files: the form to get the new information, the ASP file to add the data and an error file to check for any errors, such as duplicate primary key values:

Inserting - DEPT table Source code Try it