Ms acess database

  • Thread starter Thread starter gaffar
  • Start date Start date
G

gaffar

Sir,

I have created ms access database and tables with in that database at
runtime using vb.net code.
now i would like to establish relationship between the tables.
how to do this, please help me.

Thanks for your help.
 
Hi:

You could do this with CREATE TABLE/ALTER TABLE SQL like this sample from
Help

CREATE TABLE Orders (OrderId INTEGER PRIMARY KEY, CustId INTEGER, OrderNotes
NCHAR VARYING (255), CONSTRAINT FKOrdersCustId FOREIGN KEY (CustId)
REFERENCES Customers ON UPDATE CASCADE ON DELETE CASCADE

Regards,



Naresh Nichani

Microsoft Access MVP
 
I presume you've been using SQL statements like CREATE TABLE?
In that case, you'll need to use ALTER TABLE with a CONSTRAINT clause.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top