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,742 of 10,840   
   Jason Keats to Raoul Watson   
   Re: detecting unique primarykey in ADODC   
   26 Apr 09 06:38:56   
   
   From: jkeats@melbpcDeleteThis.org.au   
      
   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.   
      
   --- 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