Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Integer Arrays?
Message
De
06/01/2002 17:17:41
Steve Summers
Pima County Superior Court
Tucson, Arizona, États-Unis
 
 
À
06/01/2002 16:28:29
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00601324
Message ID:
00601343
Vues:
35
>>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]
:>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform