Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange results using private datasession
Message
From
03/04/2006 03:38:03
 
 
To
03/04/2006 03:02:05
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01109858
Message ID:
01109861
Views:
21
This message has been marked as the solution to the initial question of the thread.
Hi,
>I have a strange problem in a combobox control.
>
>The idea is to have a list of 12 "months" in character format.
>
>The code is placed in the form's INIT by creating an array comprising 12 months, using a dummy date, and extracting cmonth from it, in a monthly incremental For-Endfor loop.
>
>The problem, is that when the datasession is in default mode, the "months" work out perfectly. But the moment the form turns to a private datasession, which I need, I get an array of 12 months, all amounting to "January".
>
>Does someone know what's wrong?
>
>Regards,
>
>Steve
>
>The Code:
>PUBLIC armonth
>dimension ArMonth(12)
>FOR x=1 TO 12
> lddate=CTOD("01/"+alltrim(str(x))+"/"+ALLTRIM(STR(YEAR(GDDATE)))) *Using a dummy year as a base to get 12 months
> Armonth(x)=cmonth(lddate)
>ENDFOR

SET DATE is scoped to the datasession and the default is AMERICAN. Looks like you're expecting it to be BRITISH or similar..

HTH,
Viv
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform