|
-
Dec 29th, 2001, 11:51 PM
#1
Thread Starter
Fanatic Member
Questions & Answers to Relationships with ADO / ADOX and MDB
Hi everybody,
after a lot of questions to everybody without any satisfieing answer about ADO and Relationships, i contacted a friend from Microsoft who gave me this answer:
If you want to create a Relationship in ADO, it is the best way to have an Index on your table and the index is active. Then just use a SQL-command: SELECT .... WHERE
I asked him, what happens then with ADOX, and he answerred that this was only included for Marketingreasons. ADOX Relations will be anyway translated to an SQL-command, so it is better to do it direct. He said that ADOX is infact only interesting to read informations about the current INDEXes and the structure of the table out. They don't use ADOX for anythign else.
If I am wrong or he is wrong, please reply. I want to clear this Question forever.
But I am still curious about ADOX.
My questions are still the same:
1) I guess that a Key is a Index, so why in all samples (ADOX) they create always a new key/index when they are anyway already created before in a MDB?
2) In all the samples they show always only that they create a new field, with the ADOX.Table If the fields are already there why? I used before other Database-Compilers and when the fields was already there, for example CustNumber in two tables, and the to relate Table had the index correct then it was easy, just say: Set Relation for CustNumber in TableOrders
I hope to get many responses for this to clear this problem forever. Please don't just paste MSDN-code here. This Codes don't bring the solution
Thanks Frank
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|