N
Nimmagadda Ramakrishna via .NET 247
Hi,
I was thinking that the SQLDataReader should not work if there isno connection to the SQLServer.
We experimented the scenario but looks like after we execute theExecuteReader method, in the debub mode on VS.NET , we thenshutdown the SQLServer 2000. Then we tried to iterate throughthe DataReader and what I expected was an exception. But whatactually happened was that it gave me the results one after theother. Ideally the DataReader should read one row at a time fromthe stream that gets connected to the DB server and which shouldthrow an exception if we shutdown the DB server right ?
What is it that I am missing here.
Is it that the stream is opened with another class on theDB-server side which caches the rows when the Stored Procedureis executed ? And so the SQLDatatReader actually makes aconnection to that class and not the server per se ?
Please clarify this.
Thanks in advance.
Have a nice day.
Regards,
Kris
I was thinking that the SQLDataReader should not work if there isno connection to the SQLServer.
We experimented the scenario but looks like after we execute theExecuteReader method, in the debub mode on VS.NET , we thenshutdown the SQLServer 2000. Then we tried to iterate throughthe DataReader and what I expected was an exception. But whatactually happened was that it gave me the results one after theother. Ideally the DataReader should read one row at a time fromthe stream that gets connected to the DB server and which shouldthrow an exception if we shutdown the DB server right ?
What is it that I am missing here.
Is it that the stream is opened with another class on theDB-server side which caches the rows when the Stored Procedureis executed ? And so the SQLDatatReader actually makes aconnection to that class and not the server per se ?
Please clarify this.
Thanks in advance.
Have a nice day.
Regards,
Kris