Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Casting ..no. must be less than infinity
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01279794
Message ID:
01279815
Vues:
12
Hi Viv, thanks for replying
.... double Disc = rdr.GetDouble(index)

Doing this (using an Index) maens that if the layout of the Table is changed, this will not work and possibly wrong data will be saved.

Is there a way of using the field name in GetDouble() rather than an Index ??
Regards,
Gerard



>Use the OleDbReader.GetDouble() method
double Disc = rdr.GetDouble(index);
(rdr["Disc"] returns an object type which cannot be cast to double)
>
>>Hi. I have following code:
>>
>>double Disc = (Double)rdr["Disc"];
>>
>>and I am getting an error:
>>..When casting from a number, the value must be a number less than infinity
>>
>>This is in an OLeDBDataReader and Disc is a Numeric Field. It is poupulated with data. I have tried tis with N(1,0) and N(12,2) and get same error.
>>
>>Anybody got any ideas whats causing this ? . Character fields are not causing a problem.
>>Regards,
>>Gerard
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform