Hello,
I want to know that how I Return Only the schema of the data store by the data reader rather than data.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
MuthuMari MPosted Apr 25, 2012, 10:34 AM
use this line.
SqlDataReader dr = cmd.ExecuteReader(CommandBehavior.SchemaOnly)
DataTable dt = dr.GetSchemaTable();thanks.
If this post is useful then mark it as "Accepted Answer"
Anil KumarPosted Apr 25, 2012, 9:02 AM
Kunal VaishyaPosted Apr 24, 2012, 2:17 AM
Try this
Anil KumarPosted Apr 24, 2012, 12:35 AM
DataTable schema = reader.GetSchemaTable();