Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Lock and unlock record in vfp
Message
From
21/07/2015 02:41:30
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 4.0
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01622274
Message ID:
01622311
Views:
44
>Hi all,
>
>we have a small prg in VFP that generates a key from a table, works perfectly in VFP. I'm now starting to work in .Net and need to get the net available number in the table and replace the existing number with original + 1. The table that stores the keys is a frequently used VFP table so I do need locking in order to ensure that I don't duplicate keys.
>How do I go about this via C# in .Net?

IIRC, a couple of options.
The OLEDB provider supports VFP's LOCK() so you could build up a bit of VFP code and use ExecuteNonQuery().
Something like : http://stackoverflow.com/questions/16343342/oledb-foxpro-lock-record
Or, if you have VFP installed, you can run a VFP stored proc : https://support.microsoft.com/en-us/kb/299820
Previous
Reply
Map
View

Click here to load this message in the networking platform