Referential Integrity Enforced for DBs Created in AccessLast reviewed: June 21, 1995Article ID: Q104983 |
The information in this article applies to:
- Microsoft Visual Basic programming system for Windows, version 3.0
SUMMARYMicrosoft Visual Basic version 3.0 for Windows has no built-in features or properties that provide Referential Integrity. To make Visual Basic version 3.0 for Windows enforce referential integrity rules on a Microsoft Access database, build the database in Microsoft Access. To do this, open the Database window in Microsoft Access, and choose Relationships... from the Edit menu. Then in the Relationships window, select the Enforce Referential Integrity option.
MORE INFORMATIONFor more information on the way Visual Basic version 3.0 handles and enforces referential integrity, please refer to page 85 of "Professional Features Book 2." Visual Basic version 3.0 can enforce referential integrity between tables as long as the Enforce Referential Integrity option was selected in Microsoft Access. Visual Basic enforces these rules by providing certain error codes when a database built in Microsoft Access has violated the referential integrity rules in Visual Basic code. These are trappable errors in Visual Basic, so you as the programmer have the option to handle these violations as you wish. Below are the possible errors you could get that refer to referential integrity:
Dynaset objects can create an inconsistent dynaset with the DB_INCONSISTENT flag. But it may be harder to keep referential integrity when this flag is specified. See pages 58, 59, and 85 of "Professional Features Book 2."
|
Additional reference words: 3.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |