That is just what I needed. Thanks!!
Scott
>Scott,
>
>See
Re: Can sp_pkeys be used as a function in T-SQL? Message #
796855>
>
>>I am trying to dynamically create a DBC and add a view for each of the tables that are found in a SQLServer database. Everything seems to be working find using the SQLTables() and SQLColumns() functions. I just have one problem, how do I determine what they key field is programmatically. The view designer can figure it out, so there should be a way to do it thru code.... right?
>>
>>