Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Using FoxPro with .NET 3.5

11 views
Skip to first unread message

Chakravarthy

unread,
Feb 23, 2009, 7:44:15 AM2/23/09
to
Hello,

This must be an old question. How can one program a .NET 3.5 or .NET 2.0
Windows forms application against a FoxPro database ?

Thanks and regards,
Chakravarthy


Craig Berntson

unread,
Feb 23, 2009, 10:57:21 AM2/23/09
to
Use the VFP OLE-DB Provider.

--

Craig Berntson
Microsoft MVP

-------------
"Chakravarthy" <r_chakr...@hotmail.com> wrote in message
news:eGZGzRbl...@TK2MSFTNGP05.phx.gbl...

Chakravarthy

unread,
Feb 25, 2009, 1:54:45 AM2/25/09
to
Thanks.

However, how do we lock rows in VFP ? The following is a message from my
team mate . Can anyone give some ideas ?

Regards,
Chakr

===============================================================================================
The Commands which we used to lock the record in Visual FoxPro is

· Command String="Set Reprocess to 5 seconds"


· Command String="EXECS([USE customer AGAIN SHARED IN 0]+ chr(13)+
[RETURN RLock('RecordNumber', 'customer')])";

The Visual FoxPro attempts to lock the record or file based on specified
number of seconds (i.e. 5 seconds) using the above mentioned first command
string.

We used RLock () function in which we are locking the record based on record
number but not based on the Primary key.

(To use Rlock Function the fox pro table must be indexed)

· The syntax of RLock () function is

RLOCK ([nWorkArea | cTableAlias] | [cRecordNumberList, nWorkArea |
cTableAlias])· To get the cRecordNumberList we used RECNO ()
function

· The syntax of RECNO ()

RECNO ([nWorkArea | cTableAlias])· It returns a value on
which the record pointer is positioned i.e. we can get only the first record
number. We cannot get the selected record number.

Ex:

When we execute the query "RECNO (Customer)"

We will get the output "1" indicating the first record.
So we are not able to lock the selected record to perform concurrency
control.

Also Oledb does not return the error message and also it does not return any
exception and simply executes the command .
===========================================================================================================

"Craig Berntson" <cr...@craigberntson.com> wrote in message
news:C9A617B1-E5B4-4E3B...@microsoft.com...

Craig Berntson

unread,
Feb 25, 2009, 11:58:52 AM2/25/09
to
The VFP Help file has a list of commands that are supported in the OLE DB
provider. I see that LOCK() is one of them.

--

Craig Berntson
Microsoft MVP

-------------
"Chakravarthy" <r_chakr...@hotmail.com> wrote in message

news:ubR30Xxl...@TK2MSFTNGP03.phx.gbl...

0 new messages