Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SP to return a cursor
Message
From
05/08/2009 17:23:02
 
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
01416077
Message ID:
01416324
Views:
46
>>>>>BTW, see answers on your formatting question here
>>>>>
>>>>>http://forum.lessthandot.com/viewtopic.php?f=39&t=7043
>>>>>
>>>>>myvalues.ToString("$#0.00")
>>>>
>>>>This doesn't work
>>>>RetVal += "<td>" + oReader("thisyear").ToString("{0:C}") + "</td>"
>>>>and neither does this
>>>>RetVal += "<td>" + oReader("thisyear").ToString("$#0.00") + "</td>"
>>>>
I'd be happy with just commas.
>>>
>>>Ok, did you make it work?
>>
>>No, I took the question to NET forums. Both of the above attempts raise an error about casting between string and integer. DOesn't make any sense to me cause without the format code it works fine.
>
>What is the type of ThisYear? Did you try to convert it to decimal first?
>
>Please re-visit the above link for a sample.

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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform