Microsoft KB Archive/275863

= PRB: View Designer Sets Decimal Places to 3 for Double Data Types =

Article ID: 275863

Article Last Modified on 8/27/2002

-

APPLIES TO


 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 5.0a
 * Microsoft Visual FoxPro 6.0 Professional Edition

-



This article was previously published under Q275863



SYMPTOMS
When you create or edit a view using the View Designer, the number of decimal places for data types mapped as Double data type is set to 3 under the Fields Data Mapping property.



RESOLUTION
Use the DBSETPROP function to set the number of decimal places for the field: DBSETPROP('MYVIEW.MYFIELD','FIELD','DATATYPE','B(5)')



MORE INFORMATION
This is a display anomaly in the View Designer. Views that map fields to a Double data type will be displayed as defined.

Steps to Reproduce Behavior
  Create a program file named Vfpview.prg and paste the following code: IF !FILE(&quot;FLOTDEMO.DBC&quot;) CREATE DATABASE FLOTDEMO CREATE TABLE FLOATER (ident i PRIMARY KEY NOT NULL, dblfld b(5) NOT NULL) CREATE SQL VIEW FLOTVIEW AS SELECT * FROM FLOATER ELSE OPEN DATA FLOTDEMO ENDIF =DBSETPROP('FLOTVIEW.DBLFLD','FIELD','DATATYPE','B(5)') MODI VIEW FLOTVIEW  Save and then run Vfpview.prg. When the View Designer appears, click the Properties button. In the View Field Properties dialog box, select floater.dblfld. Note the decimal value displayed under Data Mapping.
 * !* Explicitly set the number of decimal places to 5.

<div class="references_section">