Exception :Row handl is invalid+OledbDataReader.GetInt32()+c#

Résolu
netsoftware Messages postés 17 Date d'inscription mercredi 8 mars 2006 Statut Membre Dernière intervention 24 avril 2015 - 1 déc. 2007 à 14:23
netsoftware Messages postés 17 Date d'inscription mercredi 8 mars 2006 Statut Membre Dernière intervention 24 avril 2015 - 6 déc. 2007 à 14:29
Slt,
j ai un probleme avec ma DataReader,
j ai fait
string reqt="marequette"
maconnection.Open()
OledbCommand  cmd=new (reqt,maconnection);
oledbDataread myread;
myread=cmd.Ex.....;
puis
myread.Read();
int m=myread.GetInt32(0);
int n=myread.GetInt32(1);
 j ai un message derreur ::Row handl is invalid
merci pour votre aide.

2 réponses

cs_coq Messages postés 6349 Date d'inscription samedi 1 juin 2002 Statut Membre Dernière intervention 2 août 2014 101
2 déc. 2007 à 15:09
Salut,

Teste le retour de la méthode Read pour être sur que des données ont été lues.

/*
coq
MVP Visual C#
CoqBlog
*/
3
netsoftware Messages postés 17 Date d'inscription mercredi 8 mars 2006 Statut Membre Dernière intervention 24 avril 2015
6 déc. 2007 à 14:29
merci pour votre reppanse , c bien sa!!!


 


 
0
Rejoignez-nous