convert csv to dbf file
-
Tuesday, May 08, 2012 10:50 AM
any one can help me
how to converting csv to dbf file (or)
how to convert datatable to dbf file
using c#.net
- Moved by Rudedog2MVP Friday, May 11, 2012 12:52 PM : move to more appropriate forum : (From:Visual C# Language)
All Replies
-
Tuesday, May 08, 2012 11:00 AM
can u help me
how to convert csv to dbf file (or)
how to convert datatable to dbf file using c# (or)
how to convert sql server to dbf file
- Merged by Rudedog2MVP Tuesday, May 08, 2012 6:53 PM : duplicate post is off-topic :
-
Tuesday, May 08, 2012 1:35 PM
Something here might help. Which is it you want to do or is it all three?
PS Don't re-post after 10 mins. I suggest deleting the previous one.
Regards David R
---------------------------------------------------------------
The great thing about Object Oriented code is that it can make small, simple problems look like large, complex ones.
Object-oriented programming offers a sustainable way to write spaghetti code. - Paul Graham.
Every program eventually becomes rococo, and then rubble. - Alan Perlis
The only valid measurement of code quality: WTFs/minute.
- Edited by RicedMicrosoft Community Contributor Tuesday, May 08, 2012 1:37 PM Added PS
-
Tuesday, May 08, 2012 1:58 PM
You should post your question here.
http://social.msdn.microsoft.com/Forums/en-US/visualfoxprogeneral/threads
Use that forum issues with associated FoxPro databases.
Hope this helps.
Rudy =8^D
Mark the best replies as answers. "Fooling computers since 1971."
-
Friday, May 11, 2012 12:54 PMI have moved your thread to a more appropriate forum for issues associated with Visual FoxPro.
Mark the best replies as answers. "Fooling computers since 1971."
-
Friday, May 11, 2012 3:28 PM
Hi.
To import from csv:
* create a cursor or have a table ready and open in which to import to
* note the fields of the csv must match the dbf or cursor
* example below imports csv file with 2 fieldscreate cursor impcurs(custnumber c(10), custaddr1 c(40)) mycsvfile = getfile("CSV") if !empty(mycsvfile) wait window "Importing CSV File... " nowait APPEND FROM EVALUATE("mycsvfile") TYPE csv wait clear endif select impcurs browse normal*note you should put in additional error checking/validation but this should import your csv file
HTH
Mike z
- Proposed As Answer by Ed Price - MSFTMicrosoft Employee, Owner Thursday, May 24, 2012 6:14 PM
- Unproposed As Answer by Ed Price - MSFTMicrosoft Employee, Owner Thursday, May 24, 2012 6:14 PM
-
Friday, May 11, 2012 5:09 PM
Mike
That looks like xBase code, the OP wanted a C# solution (well I think they did, that's where they posted). However, they have not come back and said what they are trying to do. I guess either they have solved the problem or given up in despair. :)
Regards David R
---------------------------------------------------------------
The great thing about Object Oriented code is that it can make small, simple problems look like large, complex ones.
Object-oriented programming offers a sustainable way to write spaghetti code. - Paul Graham.
Every program eventually becomes rococo, and then rubble. - Alan Perlis
The only valid measurement of code quality: WTFs/minute.- Proposed As Answer by Ed Price - MSFTMicrosoft Employee, Owner Thursday, May 24, 2012 6:14 PM
- Marked As Answer by Mark Liu-lxfModerator Monday, May 28, 2012 3:29 AM
-
Friday, May 11, 2012 5:14 PMSorry Your right.
Mike z
-
Friday, May 11, 2012 5:51 PMNot down to you Mike - it was moved here by a moderator and that's a natural reaction. No idea why it was moved given the last line of the OP. :)
Regards David R
---------------------------------------------------------------
The great thing about Object Oriented code is that it can make small, simple problems look like large, complex ones.
Object-oriented programming offers a sustainable way to write spaghetti code. - Paul Graham.
Every program eventually becomes rococo, and then rubble. - Alan Perlis
The only valid measurement of code quality: WTFs/minute. -
Saturday, May 12, 2012 8:18 AM
To convert a CSV to DBF here is what I would do.
IN VFP Comand Box
Create a dbf temporary Table, define as many columns as there are number of commas in CSV
append from <CSV FILE NAME> type CSV
- Proposed As Answer by Ed Price - MSFTMicrosoft Employee, Owner Thursday, May 24, 2012 6:14 PM
- Marked As Answer by Mark Liu-lxfModerator Monday, May 28, 2012 3:29 AM
-
Saturday, May 12, 2012 2:37 PMDoes that work in C#? The OP originally asked for this in C#. Hence posted to C# forum. A Moderator moved it here, inappropriately in my view.
Regards David R
---------------------------------------------------------------
The great thing about Object Oriented code is that it can make small, simple problems look like large, complex ones.
Object-oriented programming offers a sustainable way to write spaghetti code. - Paul Graham.
Every program eventually becomes rococo, and then rubble. - Alan Perlis
The only valid measurement of code quality: WTFs/minute.

