tags:

views:

38

answers:

3

I am working with a legacy system that stores its data in individual files (1 for each table). I can open the files with MS Excel and manipulate them, so I am hoping I can manipulate the files using .Net. I am more familiar with connecting to MS SQL Server than anything else.

I have tried a bunch of different connection strings but I can't connect to the files, mostly because I have no idea what type of files these are. Is there a way I can work with them in ado.net without knowing the exact file type?

EDIT: The files have the extension .DBF, and each have a counterpart file with a .CDX extension.

A: 

Is this a text file with comma or tab delimiters? If so, you can load them into data tables within .NET and use sql queries like you use against the regular database tables. If it is .xls file then you should be able to manipulate it in .NET usin the excel COM objects.

msvcyc
In a text editor they appear to have an odd format, doesn't look delimited in any way. Some other format it seems.
Charlie Brown
+1  A: 

DBF: old dBase format, most likely created using FoxPro (not always though).

Try this article.

Adrian Godong
+1  A: 

connectionstrings.com provides connection strings for many data files and formats.

Here's the one for .DBF files.

Jay Riggs
+1 for suggesting connectionstrings.com. Completely forgot about that site. :D
Adrian Godong