Home | Previous Page | Next Page   The Query-language Option > Running an SQL Statement >

What Happens When Errors Occur

If you make any syntax or typing mistakes in an SQL statement, DB–Access does not process the statement. Instead, it continues to display the text of the statement with a message that describes the error. For example, if a syntax error occurs, the following message appears at the bottom of the screen:

201: A syntax error has occurred.

If an execution or runtime error occurs, DB–Access continues to process the statement and returns an error message. For example, if you try to create a table that was already created, the following message appears at the bottom of the screen:

310: Table (mavis.mystock) already exists in database.

If you try to execute a statement that contains more than one SQL statement, you might not see the error message immediately. If, for example, the first statement is a SELECT statement that runs correctly and the next statement contains a typing error, the data that the first statement retrieved appears on the screen before the error message appears for the second statement.

When DB–Access detects an error, it gives you an opportunity to edit the statement that caused the error. Processing stops when the Modify option on the SQL menu is highlighted. Select one of the following methods to correct the statement:

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]