|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
DataReader's GetSchemaTable Method not fully workingSo I have this: SqlDataReader rdr = ExecuteDataReader(connection, Command.Text, "Select * from myTableName"); DataTable table = rdr.GetSchemaTable(); This is working great and telling me all the defined columns within the myTableName, except if the column is an identity and autoincremented it is not returning the right AutoIncrementSeed or AutoIncrementStep. Am I doing something wrong or does GetSchemaTable() not return the AutoIncrementStep. Or is there another way to find out what the field/column's AutoIncrementStep, AutoIncrementSeed is? Thanks, Matt Are you specifying CommandBehavior.KeyInfo | CommandBehavior.SchemaOnly when
you opened the reader? Robert Show quote "Jaffa" <Ja***@discussions.microsoft.com> wrote in message news:D2CDD3F3-98B0-4012-88BE-DD3273DEDC04@microsoft.com... > Hi, > > So I have this: > > SqlDataReader rdr = ExecuteDataReader(connection, Command.Text, "Select * > from myTableName"); > > DataTable table = rdr.GetSchemaTable(); > > This is working great and telling me all the defined columns within the > myTableName, except if the column is an identity and autoincremented it is > not returning the right AutoIncrementSeed or AutoIncrementStep. Am I doing > something wrong or does GetSchemaTable() not return the AutoIncrementStep. > > Or is there another way to find out what the field/column's > AutoIncrementStep, AutoIncrementSeed is? > > Thanks, > Matt |
|||||||||||||||||||||||