Monday, April 11, 2005

Order of the Field while inserting in the Access Database

When inserting in the Access database the order of the field in the insert statement much match the order of the columns in the table in the database.

This means that if your Access database contains the fields like this:

PersonID Name Date

Your insert query will be

INSERT INTO Person(PersonID,Name,Date) VALUES(@PersonID,@Name,@Date);

If you don't supply the values in order the insertion will not take place.

No comments: