Home All Groups Group Topic Archive Search About

how to obtain rowversion columns from a table

Author
17 Nov 2005 6:17 PM
Thierry
hi
is anyone know how can test if a datacolumn is a rowversion column ?

is ther anything same as primarykey property ?

thanks Thierry

Author
30 Nov 2005 11:06 PM
David Sceppa [MSFT]
Thierry,

     Try calling Command.ExecuteReader (specifying
CommandBehavior.KeyInfo), calling GetSchemaTable on the resulting
DataReader, and then binding the schema table to a DataGrid.  Each row in
this schema corresponds to a column in the DataReader.  Look for a column
in the schema called IsRowVersion.

     I hope this information proves helpful.

David Sceppa
Microsoft
This posting is provided "AS IS" with no warranties,
and confers no rights.  You assume all risk for your use.
© 2005 Microsoft Corporation.  All rights reserved.

AddThis Social Bookmark Button