PC Review


Reply
Thread Tools Rate Thread

Create Relation in Access.MDB

 
 
=?Utf-8?B?V29vIE11biBGb29uZw==?=
Guest
Posts: n/a
 
      18th Aug 2005
Hi,

How do I create a relation between a Master Table and its Child Table in
Access.MDB using ADO.NET.
Ex: I need to create a relationship between InvoiceNo from tblInvoice to
InvoiceNo from tblInvoiceDetail.
I need to create a Foreign Key that link CustomerID from tblInvoice to
CustomerID from tblCustomer

Anyone help?

Thank You,
mfwoo

 
Reply With Quote
 
 
 
 
Val Mazur \(MVP\)
Guest
Posts: n/a
 
      18th Aug 2005
Hi,

You would need to use COM-based ADOX to do this. ADO.NET does not support
it.

--
Val Mazur
Microsoft MVP

http://xport.mvps.org



"Woo Mun Foong" <(E-Mail Removed)> wrote in message
news:BAF94231-FEC3-43A3-9DC5-(E-Mail Removed)...
> Hi,
>
> How do I create a relation between a Master Table and its Child Table in
> Access.MDB using ADO.NET.
> Ex: I need to create a relationship between InvoiceNo from tblInvoice to
> InvoiceNo from tblInvoiceDetail.
> I need to create a Foreign Key that link CustomerID from tblInvoice to
> CustomerID from tblCustomer
>
> Anyone help?
>
> Thank You,
> mfwoo
>



 
Reply With Quote
 
=?Utf-8?B?V29vIE11biBGb29uZw==?=
Guest
Posts: n/a
 
      18th Aug 2005
Dear Val Mazur,

Can you kindly point me to the said references ?


Thank You,
mfwoo


"Val Mazur (MVP)" wrote:

> Hi,
>
> You would need to use COM-based ADOX to do this. ADO.NET does not support
> it.
>
> --
> Val Mazur
> Microsoft MVP
>
> http://xport.mvps.org
>
>
>
> "Woo Mun Foong" <(E-Mail Removed)> wrote in message
> news:BAF94231-FEC3-43A3-9DC5-(E-Mail Removed)...
> > Hi,
> >
> > How do I create a relation between a Master Table and its Child Table in
> > Access.MDB using ADO.NET.
> > Ex: I need to create a relationship between InvoiceNo from tblInvoice to
> > InvoiceNo from tblInvoiceDetail.
> > I need to create a Foreign Key that link CustomerID from tblInvoice to
> > CustomerID from tblCustomer
> >
> > Anyone help?
> >
> > Thank You,
> > mfwoo
> >

>
>
>

 
Reply With Quote
 
Paul Clement
Guest
Posts: n/a
 
      18th Aug 2005
On Wed, 17 Aug 2005 18:29:03 -0700, "Woo Mun Foong" <(E-Mail Removed)> wrote:

¤ Hi,
¤
¤ How do I create a relation between a Master Table and its Child Table in
¤ Access.MDB using ADO.NET.
¤ Ex: I need to create a relationship between InvoiceNo from tblInvoice to
¤ InvoiceNo from tblInvoiceDetail.
¤ I need to create a Foreign Key that link CustomerID from tblInvoice to
¤ CustomerID from tblCustomer
¤

ADOX, as Val mentioned, is one way to do it. However, I would recommend Jet SQL DDL instead to avoid
having to use COM interop:

http://msdn.microsoft.com/library/de.../acfundsql.asp
http://msdn.microsoft.com/library/de...l/acintsql.asp


Paul
~~~~
Microsoft MVP (Visual Basic)
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create DataSet relation with more than 1 field Tim Kelley Microsoft C# .NET 1 10th Jan 2007 04:09 AM
How to change or indciate the type of relation in Relation Diagram =?Utf-8?B?QWxwaGE=?= Microsoft Access Database Table Design 10 16th Aug 2006 10:10 AM
Problems trying to create a trust relation between 2 Active Direct =?Utf-8?B?UmljYXJkbyAoU0Ep?= Microsoft Windows 2000 Deployment 0 1st Feb 2005 04:31 PM
Create tabel with relation totto Microsoft Access ADP SQL Server 0 17th Aug 2004 04:01 PM
How to create a table with a relation Dan Microsoft Access Forms 1 8th Apr 2004 08:43 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:36 AM.