Extracting relations from existng Data Base.

  • 12 years ago

     ..........How I can to get relations from existing database(MS Access, SQL)?...And manipulate them?.. Google gives a lot of examples how to create relations in DataSet, but even when I create a new relation, I can`t to insert it  to original database......

    Some help?............ 

  • 12 years ago

    Take a look at "Alter table" sql syntax, if it has some possibility to get info also (use "Alter Table customers_cards Add Foreign Key (c_id) References customers.id On Delete Cascade" to secure that cards only for existing customers can be in database, and are deleted if parent vanishes). And second thing: take a look at Connection.GetSchema ... this could help somehow.

  • 12 years ago

    There are a couple of other things that you might be able to try:

    1. It may be possible for you to add a reference to the DAO object library which will allow you to programatically access your relationships

    2. I believe that the relationships are saved in the system table MSysRelationships so you might be able to use that to view your relationships 

     

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Every language has an optimization operator. In C++ that operator is ‘//’”