SqlDataReader Troubles

Anti-Rich

Well-known member
Joined
Jul 1, 2006
Messages
325
Location
Perth, Australia
Programming Experience
1-3
hi all,

i have a quick question about sqldatareaders... is it in any way possible to view them when a connection is not open. ie. return a datareader from a function and manipulate a combobox using the returned data reader? or am i going to have to use a dataset? i keep getting an error message saying 'Invalid attempt to Read when reader is closed'. is there a way to re-open the reader? somehow i dont think im going to be in luck :(

any help would be much appreciated
regards
adam
 
Datareaders are forward-only open-stream readers and not cached. To start over you create a new reader instance.
 
hi all,

i have a quick question about sqldatareaders... is it in any way possible to view them when a connection is not open. ie. return a datareader from a function and manipulate a combobox using the returned data reader? or am i going to have to use a dataset? i keep getting an error message saying 'Invalid attempt to Read when reader is closed'. is there a way to re-open the reader? somehow i dont think im going to be in luck :(

any help would be much appreciated
regards
adam

Read the thread about DataSet vs DataReader, its a sticky in one of the Data forums..
 
Back
Top