Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

DBF to CSV conversion using C#

Posted on 2007-08-09
6
Medium Priority
?
5,867 Views
Last Modified: 2013-11-24
Hi,

I am converting a dbf file into csv file using C#. My program is working fine for file having fewer columns in dbf file. If the dbf file has more than 255 columns, I am getting the error "FILENAME" is not a table.


I am using Visual foxpro OLEDB friver. I downloaded drivers from

http://www.microsoft.com/downloads/details.aspx?familyid=e1a87d8f-2d58-491f-a0fa-95a3289c5fd4&displaylang=en


I tried with Microsoft dBase ODBC and OLE DB drivers. Both are giving the errors.


With OLEDB:
----------------


The Microsoft Jet database engine could not find the object 'Temp.dbf'.  Make sure the object exists and that you spell its name and the path name correctly


With DBASE
------------------
ERROR [42S02] [Microsoft][ODBC dBase Driver] The Microsoft Jet database engine could not find the object "Temp.dbf'.  Make sure the object exists and that you spell its name and the path name correctly


File Temp.dbf is existing.


Initially, I tried with these drivers. But I was getting this errors and then tried with visual foxpro drivers. It is working with other files except one file which has 261 columns.


Connection strings are :
----------------------------

string inputDir = @"C:\Temp_DBF"   //my dbf file location
string fileName = "Temp.dbf";      // Tried with Temp also.
string dataSource = inputDir + "\\" + fileName;

string strConn = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + inputDir + ";Extended Properties=dBASE IV";

//string strConn = @"Driver={Microsoft dBASE Driver (*.dbf)};DriverID=277;Dbq=" + inputDir + ";";
               
//string strConn = @"Provider=VFPOLEDB.1;Data Source=" + dataSource + ";Persist Security Info=False;";


I tried with dBase 5.0 also, I am getting the error "Could Not Find Installable ISAM"



You can find more information here...
http://www.experts-exchange.com/Microsoft/Development/.NET/Visual_CSharp/Q_22744623.html




Any Help.
Thanks In Advance!!!
0
Comment
Question by:sormv
  • 2
4 Comments
 
LVL 31

Accepted Solution

by:
Frosty555 earned 600 total points
ID: 19684438
In FoxPro, a standalone table has a limit of 255 fields (or 254 if one or more of your fields is allowed null values). If you open a dbf with more than 255 fields in FoxPro, it comes back with a "not a table" error.
0
 

Author Comment

by:sormv
ID: 19687418
Hi Frosty555,


I am gettiing the error. what is the solution for this. How to read dbf file with more than 255 columns.


Thanks..
0
 

Author Comment

by:sormv
ID: 19693034
Any Idea.. how to read clipper dbf files using clipper odbc drivers..

Thanks...
0
 
LVL 1

Expert Comment

by:pcurtis_expert
ID: 21222692
http://www.vistasoftware.com/default.asp
Try the link above.  They have a 30day free trial.
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

Question has a verified solution.

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

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
Viewers will learn how to maximize accessibility options in an Excel workbook for users with accessibility issues.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

569 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