Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Integer Arrays?
Message
From
06/01/2002 17:17:41
Steve Summers
Pima County Superior Court
Tucson, Arizona, United States
 
 
To
06/01/2002 16:28:29
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00601324
Message ID:
00601343
Views:
36
>>Since VFP doesn't have an interger data type, how do I bind a combobox to an interger field type? When I load my form array with a SQL statement (Select name, id into array thisform.anames), the id field which is of integer type is converted to numeric. This causes the bound combobox to not function properly. I'm sure this is a fairly common question but failed to find anything in past threads.
>
>Integer fields exist, but integer variables don't - IOW, a variable (or array member, for that matter) will always show a type of "N", even if it may be kept in an integer format, which we can't be sure of.
>
>The weird behavior of your combo may come from other sources - are you sure the .boundcolumn=2, .boundto=.t. and that initially the value of the combo is a number? The third thing is important, because it'll convert your second column into strings if you leave the value to default (which is an empty string).

Thank you for you response. I looked a the properties and .boundcolumn=2 and .boundto=.t. Not sure what you mean by "initially the value of the combo is a number?". I look at the array after form.load and the integers are converted to "Numeric". The problem is that the numeric value in the array -21474E+9 does not match the database value of -2147400000. I feel I need provide more information here. The data looks like this:
Cust
CUSTID(Integer) Name(Char)
-2147400000 Fred
-2147399999 Tom

The ID is a foriegn key in orders
ORDERID CUSTID(Integer) DESC
1 -2147400000 Orginal Order
2 -2147400000 Backup Order
3 -2147399999 Orginal Order

The form is the order form where the Customer is the combobox bound to Orders.custid field. The combobox array is loaded at the form.load

Thanks again.
Thanks in advance or I hope this helps!

[STS]
:>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform