home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.visual.basic      MS Visual Basic discussions, NOT dot-net      10,840 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 10,743 of 10,840   
   Raoul Watson to Jason Keats   
   Re: detecting unique primarykey in ADODC   
   27 Apr 09 03:06:10   
   
   From: WatsonR@IntelligenCIA.com   
      
   Jason Keats wrote:   
   > Raoul Watson wrote:   
   >> Using the old MSJet engine,   
   >> I can detect a unique key by checking:   
   >>   
   >> If DBControl.Database.TableDefs("tblname").Indexes("fieldname").Unique   
   >> Then   
   >>   
   >> Can someone help me on a way   
   >> how can this be done on an ADODC ?   
   >>   
   >> I need to determine if the primarykey field in   
   >> the DB requires a unique key..   
   >> (I know the DB and field name)   
   >>   
   >> Any help is greatly appreciated. Thanks!!   
   >   
   >   
   > What I think you should be investigating is:   
   >   
   > rst.Fields("fieldname").Properties.Item("KEYCOLUMN").Value   
   >   
   > If False, then it's not a primary key.   
   >   
   >   
   Thanks Jason.. unfortunately I am looking to find out if the primarykey   
   field requires a unique value..   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca