Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SP to return a cursor
Message
From
05/08/2009 17:53:15
 
 
To
05/08/2009 17:41:40
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
01416077
Message ID:
01416350
Views:
46
>>>>>The source cursor was created via
>>>>>select dist fundtype, ;
>>>>>	cast(000000000000.00 as N(15,2) NULL) as priorpmt,;
>>>>>	cast(0000000000 as I NULL) as thisyear, ;
>>>>>	cast(0000000000.00 as N(13,2) NULL)as spent, ;
>>>>>	cast(0000000000.00 as N(13,2) NULL) as currentbalance, ;
>>>>>	cast(0000000000 as I NULL) as futureprogram, ;
>>>>>	cast(0000000000.00 as N(13,2) NULL) as total ;
>>>>>	from tipdatabase!fundtypes ;
>>>>>	order by fundtype ;
>>>>>	into cursor crsTemp readwrite
so the datatype for thisyear is integer although there are also number fields I will have to deal with in similar fashion. I think my second sample was taken directly from the site shown in your link.
>>>>
>>>>If the ThisYear is Integer, why do you want to display it in the money format? May be you wanted another field, say, Spent ?
>>>
>>>The entire table is money. Budgets are kept in whole dollars hence integer for efficiency. Expenses however carry the pennies hence a decimal value.
>>
>>Anyway, cast everything to N(13,2) or to Currency. Does the formatting code above work for Numeric fields?
>No it does not.

Interesting, this
Dim myval As Decimal = oReader("priorpmt")
Response.Write(myval.ToString("$ #0,0.00"))
will work, but
Response.Write(oReader("priorpmt").ToString("$ #0,0.00"))
will not. So it looks like the reader is presenting a string and not a number.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform