Relasion Ships I Access2000

K

Klaus L Jensen

I have made a tool to make 2 Databases alike, it generates scripts but som
times I get a "Could not change field, within a relation" is there anyway to
see these relationships??

Please help me....


Med venlig hilsen
Klaus Ladegaard Jensen
 
J

John Vinson

I have made a tool to make 2 Databases alike, it generates scripts but som
times I get a "Could not change field, within a relation" is there anyway to
see these relationships??

Please help me....

Here's some VBA code to list all the relationships:

Public Sub ShowAllRelations2()
Dim db As DAO.Database
Dim rel As Relation
Set db = DBEngine(0)(0)
For Each rel In db.Relations
Debug.Print "Relation "; rel.Name, rel.Table, rel.ForeignTable
Next rel
End Sub
 
K

Klaus L Jensen

Thanks, but I use Delphi (ADO)

Do not know any VB

Can I get a translated version ??

Med venlig hilsen
Klaus Ladegaard Jensen
 
J

John Vinson

Thanks, but I use Delphi (ADO)

Do not know any VB

Can I get a translated version ??

Med venlig hilsen
Klaus Ladegaard Jensen

I'm not all that familiar with the ADO object model, but on a quick
look at some references it appears that (unlike the JET-specific DAO
objects) it doesn't expose a Relationships object. Perhaps someone
else can help? Or you can look at the MSysRelationships hidden systems
table and loop through it.
 

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

Top