[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

DBF to txt file

Posted on 2011-09-07
5
Medium Priority
?
1,494 Views
Last Modified: 2012-05-12
Can someone show me some code that converts DBF to flat text file.
0
Comment
Question by:conceptdata
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 12

Accepted Solution

by:
rajapandian_81 earned 1000 total points
ID: 36495519
0
 

Author Comment

by:conceptdata
ID: 36497408
Thanks.
But Ihave a little errors in the "DBF file to dataset" code.

I converted i to C#, and it looks like attached code .

But I am getting a lot of errors in the code.
Can you help - Thanks

using Microsoft.VisualBasic;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
using System.Data.OleDb;

public class Form1
{

    private string constringSource = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\\LH\\CENSHLD2;Extended Properties=dBASE IV;";
    private OleDbConnection conSource = new OleDbConnection(constringSource);
    private string sqlSource = "SELECT * FROM CENSUSES.DBF";
    private OleDbDataAdapter daSource = new OleDbDataAdapter(sqlSource, conSource);

    private DataTable dtSource = new DataTable("SourceTable");
    private void Form1_Load(object sender, System.EventArgs e)
    {
        string msg = "";
        long ticks = DateAndTime.Now.Ticks;
        daSource.Fill(dtSource);
        msg = (DateAndTime.Now.Ticks - ticks) / TimeSpan.TicksPerMillisecond + " milliseconds to read " + dtSource.Rows.Count + " rows of " + dtSource.Columns.Count + " fields";
        Interaction.MsgBox(msg);
    }
    public Form1()
    {
        Load += Form1_Load;
    }
}

Open in new window

0
 

Author Comment

by:conceptdata
ID: 36497612
Hi Again ..

I have solved it myself, I think .. :)
0
 
LVL 12

Expert Comment

by:rajapandian_81
ID: 36500432
Are you able to convert DBF to flat text file?
0
 

Author Comment

by:conceptdata
ID: 36521018
Yes - Thanks.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

656 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