I want to use FoxPro database in backend and c# .net in front end but i don't know how to connect with foxpro database in .net
For connectivity what code i use, please suggest...
I want to use FoxPro database in backend and c# .net in front end but i don't know how to connect with foxpro database in .net
For connectivity what code i use, please suggest...
You may want to look at .Net Interop.
Also take a look at West-Wind web connect. They have a framework that allows you to use the Visual studio IDE to create webforms but also use your VFP business logic and data source. This works well.
West wind also has a wwDotNetBridge that allows you to access .Net components from VFP.
Check out their website below.
http://west-wind.com/WestwindClientTools.aspx http://www.west-wind.com/presentations/VFPDOTNETiNTEROP/VFPDOTNETINTEROP.HTM
I don't think you necessarily need to go the way of "interop", but get a basic understanding of connecting and querying data.
First, get Microsoft's OleDB provider located here
Here is a sample doing a connection and running a simple query to get data but this one sends the results to another VFP table instead of bringing back to C# for process/usage.
Once you get the basics down, its not that difficult. I've actually made a simple "wrapper" class to centralize ensuring a valid connection, execute a given query and closing connection when done. Then, I've just added methods to it for each thing I wanted to do (or could be subclassed too). Anyhow, when I need to do a certain action, I would just call that function and pass in whatever parameter(s) was(were) needed.