borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Access to Word Mail Merge Automation)Next Topic (stored procedure) New Topic New Poll Post Reply
AndreaVB Forum : Database : Referential Integrity
Poster Message
Vampyr Bytes
Level: Protégé

Registered: 10-06-2005
Posts: 6

icon Referential Integrity

Hi

I'm writing a program in VB6 which will be able to connect to any Access database and search, add or remove data. As such I need to get all the data about the database during runtime.
So far I've got all the information I need except whether or not referential integrity is enforced on a join. Is there a way to find this out without trying to add data and catching the error returned if it fails?
I'm using ADO objects and methods.

Thanks in advance

Vampyr Bytes

16-06-2005 at 07:01 AM
View Profile Send Email to User Show All Posts | Quote Reply
Goran
Level: Moderator

Registered: 16-05-2002
Posts: 1681
icon Re: Referential Integrity

Yes it is possible with ADOX. An example:

Dim cat as new adox.catalog

    cat.activeconnection= connobject ' (or connection string)

dim tblchild as adox.table

    set tbl=cat.tables("childtablename")

dim k as adox.key
dim col as adox.column

    for each k in tblchild.keys
        debug.print k.updaterule
        debug.print k.deleterule

        ' to get fileds that form key
        for each col in k.columns
            debug.print col.name        
        next col
    next k


____________________________
If you find the answer helpful, please mark this topic as solved.

16-06-2005 at 01:57 PM
View Profile Send Email to User Show All Posts | Quote Reply
Vampyr Bytes
Level: Protégé

Registered: 10-06-2005
Posts: 6
icon Re: Referential Integrity

Thanks Goran  

17-06-2005 at 06:25 AM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : Database : Referential Integrity
Previous Topic (Access to Word Mail Merge Automation)Next Topic (stored procedure) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder