Solved

relation beetwen 2 tables

Posted on 1998-08-26
1
135 Views
Last Modified: 2010-04-30
What is the best method to relation 2 tables from the same database?Give me some code please.

thanks
Alberto

0
Comment
Question by:asimoes
1 Comment
 
LVL 1

Accepted Solution

by:
JayMerritt earned 100 total points
Comment Utility
For permanent relationships:
In native ACCESS for MDB files, there is a relationship painter that is quite nice and saves the relationships with the MDB file.  Cascade deletes are well supported.  This tool does not require code.


For SQL Server, you will need to use triggers to manage the relationships.

For temporary relationsips:
Use a SQL SELECT statement with a WHERE clause like
  SELECT *
  FROM tblTableA, tblTableB
  WHERE tblTableA.Key = tblTableB.Key

Access also has a QBE tool for painting these Inner and Outer JOINs.  You can copy the SQL from the QBE by looking at the SQL option instead of the DESIGN option.
 
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now