Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ExecSprocReader closes the datareader
Message
De
21/06/2004 14:10:18
 
 
À
18/06/2004 12:13:51
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
00915122
Message ID:
00915747
Vues:
16
I asked this 10 days ago:

>Getting error: Invalid attempt to Read when reader is closed.
>Code in my business object:
...
> SqlDataReader dr = (SqlDataReader)this.ExecSprocReader(
>   "MyStoredProcedure", this.DatabaseKey, sqlParams);
>
> while ( dr.Read() )  // <--- error
...
>
>The ExecSprocReader() code in mmDataAccessBase closes the connection before it returns the reader.
>
>I'm not completely sure, but I thought that closing the connection basically closed the reader as well. Please advise, thanks!

Kevin's reply:
I confirmed that this is a problem. We'll fix this in the upcoming release of MM .NET.

Regards,
Kevin McNeish
...

You'll either:
1) have to change the ExecSprocReader() code in mmDataAccessBase to remove the close()

note from message ID: 914090 (I don't know how to link to Universal Thread messages...) on 6/15/04

The assemblies have a Strong Name Key that isn't distributed with the framework. You'll have to create you're own SN Key and recompile the framework in order to make changes.

(Is how to do this correctly, safely, in the MM documentation?)

or 2) don't use that code. I chose 2, as I have a web application that has at the most 5 users at a time and can get away with just using DataSets.
Working within the MM framework, I did have to create a business object for each table though.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform