On Wed, Jun 10, 2009 at 12:51 PM, MB Software Solutions General
Account<[email protected]> wrote:
> Tracy Pearson wrote:
>> Just glancing through this code, I see these two things to have concerns
>> about:
>>    There is no validation for the FLOCK took place.
>>    The Select may not return a value, and yet they still run the update
>> putting in a -1
>>
>>
>> HTH,
>> Tracy
>
>
> I agree...I saw that too when I was reviewing it.  Is there a way for a
> return value of .T. to be sent back to their DotNet app when they issue
> the FLOCK?

I don't think that you can do this type of functionality from ODBC:

Exec(Statement Locks)
Exec(Another Statement here)
Exec(update the locked )
Exec(Statement Unlocks)

Even though you "think" you have that connection to the VFP Engine,
you are in a disconnected mode.  So the engine will UnLock() on you.
I remember beeing in this hell back in 2003/4 when I thought it would
be ok to use VFP tables for data in a winform app.  I changed the PKey
to GUID and I created it myself in the app, instead of expecting the
db to do that for me.

Now what are you going to do?

You have to pass in all of the code to execute as a batch job and run
it.  In VFP you have a try catch block to pass back -100 for a failure
and a + # for any real int that is "good"

Would be better if you just exposed an SP in the database for them to
call.  That way you do what VFP does and they are fed the answer they
needed.


-- 
Stephen Russell
Sr. Production Systems Programmer
Web and Windows Development
Independent Contractor
Memphis TN

901.246-0159

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to