Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Casting a VFP numeric field
Message
From
31/03/2009 11:25:42
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01392244
Message ID:
01392392
Views:
43
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
Previous
Reply
Map
View

Click here to load this message in the networking platform