Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Casting a VFP numeric field
Message
De
31/03/2009 11:25:42
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01392244
Message ID:
01392392
Vues:
44
Because what you get from VFP is decimal. You can use Ntom() on VFP side to return an integer if you need. In any case Convert.ToInt32() is the safe approach.
Cetin

>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform