troubleshooting Question

DBF to CSV conversion using C#

Avatar of sormv
sormv asked on
Microsoft Applications
4 Comments1 Solution6641 ViewsLast Modified:
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...
https://www.experts-exchange.com/Microsoft/Development/.NET/Visual_CSharp/Q_22744623.html




Any Help.
Thanks In Advance!!!
ASKER CERTIFIED SOLUTION
Frosty555

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros