We have a prospect with FoxPro 2.6 (whatever it means) system.
Our product integrates with other systems by the means of triggers (usually). We would place couple of triggers on X system and then just pull collected data for our use. This way there is no need to customize customers product and it works great(almost real time – we poll for changes every 30 seconds).
Question:
- Can I put triggers on FoxPro 2.6?
- Can access FoxPro from .NET?
Any catches/caveats?
- Can access FoxPro from .NET?
Yes, you can use the FoxPro OLE DB Driver provided by Microsoft, to connect to FoxPro through .NET. It may be done in C# the following way:
OleDbConnection oleDbConnection1 = new OleDbConnection("Provider=VFPOLEDB.1;"+
"Data Source=C:\myVFPDatabase.DBC;");
oleDbConnection1.Open();
OleDbConnection oleDbConnection1 = new OleDbConnection();
oleDbConnection1.ConnectionString = "Provider=VFPOLEDB.1;" +
"Data Source=C:\myVFPDatabase.DBC;";
oleDbConnection1.Open();
According to Microsoft, this works with at least Visual FoxPro 7. FoxPro 2.6 does not support DBC files, and as such you would have to access it the DBF way (according to programmer2programmer at least), such as :
"Provider=vfpoledb.1;Data Source=C:MyDataDirectory;Collating Sequence=general;"
Note that the first link also mentions how to configure and test the connection in Visual Studio (if you are using it of course). As for your second question,
- Can I put triggers on FoxPro 2.6?
Unfortunately, No, you can’t create triggers in FoxPro 2.6 (thanks to user @Morons and the Internet)
3