Solved

Need to delete and import data into DBF file

Posted on 2008-10-24
13
615 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
 
LVL 17

Expert Comment

by:ramrom
Comment Utility
Did you look at the links CarlWarner provided?
0
 
LVL 2

Author Comment

by:nemesis1210
Comment Utility
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
Comment Utility
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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 2

Author Comment

by:nemesis1210
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Sorry, you ARE already posting here. It's me who's in the "wrong" section.

Bye, Olaf.
0
 
LVL 12

Expert Comment

by:jrbbldr
Comment Utility
"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
Comment Utility
Take a look at the original question:

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

0
 
LVL 2

Author Closing Comment

by:nemesis1210
Comment Utility
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

772 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now