Solved

Need to delete and import data into DBF file

Posted on 2008-10-24
13
632 Views
Last Modified: 2013-11-26
Very early into this project (installing Visual Studio as I type this) and am looking to get some guidelines on how to go about completing

I have a CSV file with data which I need to import into a DBF file, I want to do this with a windows interface so the user can click on one of two buttons which will look for the CSV file in a specific location with a specific name and then depending on the button clicked delete records within a DBF file that have a specific value in a field and then import the data from the CSV into the DBF applying that value back into the field essentially replacing all data in the DBF for those records with that value, the other button works the same using a different value.

I am new to this and looking for an idea of which language is best to use to accomplish and the general guidelines to follow. I do have some experience with C# and VB not much however, I also have some SQL experience however have never worked with foxpro tables.

Thanks for your time
0
Comment
Question by:nemesis1210
  • 5
  • 4
  • 2
  • +2
13 Comments
 
LVL 33

Expert Comment

by:CarlWarner
ID: 22796583
Here's a good place to start:

How to: Access Visual FoxPro Data in Visual Studio
http://msdn.microsoft.com/en-us/library/3haz2895(VS.80).aspx

Microsoft OLE DB Provider for Visual FoxPro
http://www.microsoft.com/downloads/details.aspx?FamilyId=E1A87D8F-2D58-491F-A0FA-95A3289C5FD4&displaylang=en
0
 
LVL 17

Accepted Solution

by:
ramrom earned 500 total points
ID: 22796646
I'd do it in FoxPro or Python. User interfaces are easy and so is adding records to a table from a CSV file.

Perhaps someone with with C# or VB expertise will say otherwise.

Do you have FoxPro or can you get it?

Python is open source therefore free.
0
 
LVL 2

Author Comment

by:nemesis1210
ID: 22796983
ok so I am using VB.Net for the moment I can see the table in the Data Connections section of the Server Explorer, but what to do I need to do to have the button on my form delete certain records from that table?

0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 17

Expert Comment

by:ramrom
ID: 22797262
Did you look at the links CarlWarner provided?
0
 
LVL 2

Author Comment

by:nemesis1210
ID: 22797459
Yes I did which has helped me to see the table in the Data Connections section I have also created a Dataset and can see the field names from that, but for the moment I have a form with a button that does nothing I want to know how to have that button perform the funtions on the data
0
 
LVL 17

Expert Comment

by:ramrom
ID: 22798049
Do you know how to write event procedures in VB?

You will have to write one for the command button click event. In that procedure you will create the appropriate file reading and SQL statements to accomplish your task.

Unfortunately I do not have Visual Studio installed. My knowledge of these things is derived from MS Access (Visual Basic for applications).

Perhaps someone else will have the knowledge to flesh this out for you.

Are you still open to other language choices?
0
 
LVL 2

Author Comment

by:nemesis1210
ID: 22798088
I dont know the code to use in VB.net I too have done similar things with access databases using VBA but that was years ago, I am still open to any of the languages available in Visual Studio 2008
0
 
LVL 17

Expert Comment

by:ramrom
ID: 22800302
Then I can't help. If you decide to go outside the VS box let me know.
0
 
LVL 29

Expert Comment

by:Olaf Doschke
ID: 22800392
Well, if you have a VFP table in a .NET dataset, question to work on that dataset are purely .NET related, as the data arrived in the .NET world. So you better ask in that section how to delete a record in a dataset.

Bye, Olaf.
0
 
LVL 29

Expert Comment

by:Olaf Doschke
ID: 22800399
Sorry, you ARE already posting here. It's me who's in the "wrong" section.

Bye, Olaf.
0
 
LVL 12

Expert Comment

by:jrbbldr
ID: 22800666
"ok so I am using VB.Net for the moment"
"I dont know the code to use in VB.net "

It sounds like this is a question for another forum - specifically a VB.net forum where you can find an audience better suited to answer your VB.net questions.

Once you understand the necessary basic syntax in the language of choice (regardless of the back-end table you are using), then for specific VFP questions, we are here to help.

Good Luck

0
 
LVL 17

Expert Comment

by:ramrom
ID: 22801263
Take a look at the original question:

Zones:   Visual Studio, FoxPro Database, Microsoft Visual Basic.Net  

0
 
LVL 2

Author Closing Comment

by:nemesis1210
ID: 31509653
As recommended I did complete the project in just a few hours using Foxpro, at the time of posting the question I did not have it available but seemed to be the only way to easily acheive the desired result
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question