What is the easiest way (without installing extra drivers) to open a FoxPro DBF table and link it to a DataGrid in WPF?
4 Answers
I guess this as nothing do do specificaly with WPF. You can link almost any .net collection/data collector object to WPF data grid.
But your problem stands way before that and concerns .net data access in general. You should remove the WPF tag from your question and rather see what ADO. net can do for you.
Once this is done and that you have the content of your FoxPro db in a .net collection, then you will worry about WPF ;)

- 1,944
- 13
- 22
i don't think this is possible without driver installation. see this question.

- 1
- 1

- 11,817
- 4
- 41
- 57
There are ways to do it without installing new drivers but none if them are easy.
You could inspect the table at the file level - the structure is documented here: http://fox.wikis.com/wc.dll?Wiki~TableFileStructure
Or you could write a VFP exe that you can run from your C# code that dumps the table to XML. See the CURSORTOXML function for more details.
Written on my iPhone.

- 917
- 9
- 21
-
But even with this option, even by creating a multi-threaded dll COM server, that opens up a bunch of other crud... security, permissions, etc and would STILL require VFP itself to be installed which would be more than just the simple VFP OleDb Provider (which does work great). – DRapp Jun 24 '11 at 01:15
-
I realised that about the DLL option - that's why I suggested a spawned exe - no registration required. Yes the runtimes would need to be installed for the second option. But if there is a foxpro table on the machine, it could be that they already are. You can also get silent, fire-and-forget installers for VFP runtimes that you can install at the same time as your program. – William Mioch Jun 24 '11 at 07:35
Do you know how to use basic ADO.Net to connect to a FoxPro DBF table and create a Typed DataSet? That's the first step you've got to get working. From there, the task becomes binding a WPF DataGrid to a Typed DataSet.

- 9,115
- 5
- 43
- 52