Hi..
Ques : I want to force the data reader to return only schema of the data store 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.
Jignesh TrivediPosted Feb 21, 2012, 10:39 PM
try
myReader = cmd.ExecuteReader(CommandBehavior.KeyInfo)
'Retrieve column schema into a DataTable.
also referschemaTable = myReader.GetSchemaTable()
http://support.microsoft.com/kb/310108
http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqldatareader.getschematable.aspx
hope this help.
Satyapriya NayakPosted Feb 21, 2012, 9:52 PM
PobjDataReader = pobjCommand.ExecuteReader (CommandBehavior.SchemaOnly)
Thanks