Click to See Complete Forum and Search --> : Can you designate a field as a KEY . . .


John Reynolds
August 29th, 2001, 04:37 PM
with any of the tools in VB 6.0? I've played with the Data View & VisData, but cannot seem to designate a field as KEY. How? Or do you have to do this with Access app?

Also, how do you get Database Diagrams to show up using Data View? I get Table & Views, but not Database Diagrams. (?)

Would sure appreciate any comments or suggs.

Thanks,
John

makai
August 31st, 2001, 01:27 AM
you need to use the tabledef object and reference an existing index or create a new one - then

Set AuIdx = MyTd.CreateIndex("AuthorID")
AuIdx.Primary = True
AuIdx.Unique = True

there are examples in Books On Line in help

John Reynolds
August 31st, 2001, 09:33 AM
Thanks for your excellent response. In developing DB apps, do you think the Enterprise edition is necessary or worth the extra $?

Thanks in advance for your opinion.
John