Solved

Need to delete and import data into DBF file

Posted on 2008-10-24
13
636 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
Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

 
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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

820 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