Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update VFP data from C#
Message
 
To
03/05/2004 15:07:30
General information
Forum:
ASP.NET
Category:
ADO.NET
Miscellaneous
Thread ID:
00900338
Message ID:
00901191
Views:
34
The VFP Runtime files will need to be present at each client that touches the data for VFP stored procedures and triggers to fire.

>Yes, that works.
>What I am having problem now with is that my table has a trigger
>and that trigger fails. Shoud it work in case of a trigger?
>
>>Mark,
>>
>>Sorry, I read the wrong post and didn't realize you were the original poster. I sent it to Dmitry by mistake...sorry, guess I need more coffee today.
>>********************
>>
>>I had to update VFP data from C# a little while ago. Here's something that might help...(you'll need the latest OLE DB Provider for VFP)
>>
>>Here's a really simple example of updating an invoice amount based on a key
>>
>>
>>using System.Data.OleDb;
>>
>>string cUpdateCmd;
>>cUpdateCmd = " UPDATE Invoices SET INVAMT = 1000 WHERE INVOICEID = 2";
>>OleDbConnection oConn;
>>oConn = new OleDbConnection("Provider=VFPOLEDB.1;" +
>>"Data Source=c:\\masonry\\data\\mydbc.dbc");
>>oConn.Open();
>>OleDbCommand MyCommand = new OleDbCommand();
>>MyCommand.Connection = oConn;
>>MyCommand.CommandText = cUpdateCmd;
>>MyCommand.ExecuteNonQuery();
>>
>>Again, very basic, and there may be other ways to code it, but hopefully that will get you started. The VFP Ole DB Provider has one or two code samples in the help file, I believe.
>>
>>Kevin
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform