Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Listbox Column Left Aligned w/Numeric SQL Server field t
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01384795
Message ID:
01384815
Vues:
76
>I'm doing a simple select characterfield,numeric field from a SQL Server 2008 DB and using the resulting cursor as the rowsource for a listbox. Because I display numeric data and want it to be right aligned I use a fixed width font (Courier New). For some reason the numeric field is getting left justified? If I do the exact same query against VFP database tables the alignment is properly right justified?
>
>Using driver={SQL Server Native Client 10.0}
>
>What am I missing?

Because it is a Listbox, and the font is non-proportional, you can try formatting the numeric field with the Transform() function. When a numeric field is applied to a listbox column, Fox will automatically convert numeric field to a character type. There are different types of numeric fields. If SQL data is a decimal or float type, the true length may not be recognized by fox and the character result is trimmed. A true Fox Numeric field is stored as characters (0-9) and not as a binary.

This is not tested, it just seems logical.
Greg Reichert
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform