Defining table relationships in VB 
Author Message
 Defining table relationships in VB

    I've been using Access to make tables and setup relationships for my
VB databases: that's standard practice.  Though it's easier to do in
Access, I thought it was actually IMPOSSIBLE to define relationships in
VB.  I don't know exactly where I got that impression.  Probably scanning
thru messages here... :)

    Anyway, the Access Knowledge base article Q116145 "Create and Drop
Tables and Relationships using SQL DDL" explains how to set up data
definition queries to generate two tables and a relationship between
them.  I tried (via .Execute) the queries in VB pro, using the Jet 2.5
layer: it works.  Going back to Access and checking on the DB showed both
tables and the proper relationship.  Least as far as I can tell at 5:11
in the morning...

    So, is this news to anyone else?  I must have passed over that
article five or six times in the last few months without ever even
noticing this.  Mind, it's still a whole lot simpler to just go to Access
and define everything, but knowing it's possible from VB opens up some
options.  Or did I miss something in my late night/early morning stupor?



Tue, 29 Jul 1997 13:15:13 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Define a Relationship between tables without code?

2. Relationships between access tables in VB 4

3. VB Wannabe: ADO and tables - retrieval and relationships

4. VB Wannabe: ADO and tables - retrieval and relationships

5. defining relationships

6. DAO 3.6 with Access Database 2000 with relationships defined

7. Crystal Reports: Help required in defining one-to-many relationship on db schema

8. Define table location from VB for report?

9. Need Help on Relationships for imported tables...

10. How Can I Change Table Relationships Programmatically

11. Auto create record for one-to-one relationship tables

12. Moving table relationships from database to database

 

 
Powered by phpBB® Forum Software