G
Guest
Hi,
I have an open and active sqlDataReader object and would like to determine
which of the fields is the PrimaryKey (if present).
I intend to use this to create generic DataTable objects in a library by
passing in a sqlDataReader object, and the library returns a DataTable object
from the reader. This all works fine so far, but I cannot find a way to
determine which field in the sqlDataReader is the PrimaryKey so as to set the
corresponding Column in the DataTable as the PrimaryKey.
Any help appreciated.
I have an open and active sqlDataReader object and would like to determine
which of the fields is the PrimaryKey (if present).
I intend to use this to create generic DataTable objects in a library by
passing in a sqlDataReader object, and the library returns a DataTable object
from the reader. This all works fine so far, but I cannot find a way to
determine which field in the sqlDataReader is the PrimaryKey so as to set the
corresponding Column in the DataTable as the PrimaryKey.
Any help appreciated.