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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dbf to csv to dbf

Status
Not open for further replies.

shalmoli

MIS
Jun 20, 2008
2
0
0
BE
I need to upload csv data into an accounting package.

csv -> dbf(using Append from csv type delim) -> program checking dbf -> load to main dbase program

To test the setup, I have downloaded a file that imports perfectly, converted into csv , and used Append command to create dbf. The file size gets increased by a few bytes (34 bytes) for a 600KB files and the checking program reports error. I guess I am missing out something. Any ideas???
 
Lots of users like to place commas inside data fields. The CSV will load into a dbf but the data types of the fields after the user added comma is hosed and will cause errors.

If you can control it, get a the download as a DBF or SDF instead of a CSV.

If not add a extra column to a CSV import and checks the extera field for data. If any data exist in the extra field, then you have a user added comma in the data.



David W. Grewe Dave
 
Thanks for the suggestion.
I cannot get output as sdf or dbf.
Now , I have progressed a little - the reason why the file shows a few bytes more is that the numeric fields that are blank gets a stamp of 0.000 . The dbase field has the type NUMERIC 17,3. The dbf files that upload donot get this stamp.How can I prevent the files from getting this default value (0.000) when I use append to import the csv file.
 
You can try set decimal to 0 , but I doubt that will work.

David W. Grewe Dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top