Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

number as text 1

Status
Not open for further replies.

feshangi

MIS
Nov 24, 2004
265
US
i am using cfcontent and cfheader to export some sql data to a dbf file. some of the numeric data should be in text datatype. for example a particular numeric value has to read as 05 vs. 5 so it i would like to set this field as a text datatype. i am actually passing 05 via cfheader/cfcontent but it automatically turns into 5. is there a way (may be a cf function) to force these values to recorded as a text datatype? or how about if instead of a dbf i make a txt file with comma delimited format and then import that txt file into a dbf file?

here is some of my code:
Code:
<CFSET TabChar = Chr(9)>
<CFSET NewLine = Chr(13) & Chr(10)>
<CFSETTING enablecfoutputonly="YES">
<CFCONTENT type="APPLICATION/dbase">
<CFHEADER name="Content-Disposition" value="filename=filename.dbf">

thanks in advanced

mike
 
If you want a numeric value to have two number places you can use #NumberFormat(5,'00')#. This would return 05.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top