>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-recordOr, if you have VFP installed, you can run a VFP stored proc :
https://support.microsoft.com/en-us/kb/299820