5

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:

  1. Can I put triggers on FoxPro 2.6?
  2. Can access FoxPro from .NET?

Any catches/caveats?

5
  1. 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,

  1. 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)

  • 1
    -1 Foxpro 2.6 did not support Triggers or have a DBC File – Morons Sep 28 '12 at 14:51
  • yep, just read that... after posting the answer. Going to change the answer – Jalayn Sep 28 '12 at 14:51
  • Changed by vote! +1 :) – Morons Sep 28 '12 at 15:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.