Hello,
I want to know that how I Return Only the schema of the data store by the data reader rather than data.
Data Reader Returns only schema of the data
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Anil KumarRank #367 · 6.8K reputationPosted Apr 23, 2012, 8:35 PM EDT
DataTable schema = reader.GetSchemaTable();
Kunal VaishyaRank #990 · 2K reputationPosted Apr 23, 2012, 10:17 PM EDT
Try this
Anil KumarRank #367 · 6.8K reputationPosted Apr 25, 2012, 5:02 AM EDT
MuthuMari MRank #5,738 · 288 reputationPosted Apr 25, 2012, 6:34 AM EDT
use this line.
SqlDataReader dr = cmd.ExecuteReader(CommandBehavior.SchemaOnly)
thanks.
If this post is useful then mark it as "Accepted Answer"