Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Casting a VFP numeric field
Message
De
30/03/2009 18:24:40
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01392244
Message ID:
01392250
Vues:
42
Hi Gerard
Because I think you are dealing with an object even though you might have an int in the underlying field. using (int) is an implicit cast and does not work with objects.
Tim

>Hi Tim. Thnaks for replying.
>Yes, Convert.ToInt32() works fine
>
>Why does this work and Int() does not ?? Are both these commands not doing the same thing
>regards,
>Gerard
>
>
>>Can you use Convert.ToInt32() ?
>>
>>>Hi
>>>I have following code , in ASP.net but I get a casting error
>>>
>>> int intNumber;
>>> intNumber = (int)MyDs.Tables[0].Rows[0]["PAR_NUM"];
>>>
>>>If I leave out tjhe int, I get a complier error
>>>
>>>
>>>How do I store a VFP NUmeric field to a C# field
>>>
>>>TIA,
>>>Gerard
Timothy Bryan
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform