Hi Alan,
On 2019/10/23 13:52, Alan Bourke wrote:
use customers in 0 shared
I wouldn't need to specify the CDX as it would be opened automatically.
If I remember correctly, DBFCDX is AutoOpening CDX. Might be good to
ask on the forums, Robert currently en-route to SWFOX, but Chris is
monitoring.
Just need to confirm, there is also a SET AUTOOPEN True for default setting.
I could also do, in VFP:
if seek("ADA0001", "customers", "account")
endif
X# contain the function DbSeek:
FUNCTION DbSeek( uKey AS USUAL, lSoftSeek AS USUAL, lLast AS USUAL ) AS
LOGIC
This does the seek on the current order in the current workarea. If
needed on a different workarea (OrderDetail):
IF OrderDetail->DbSeek("ADA0001")
or in fact:
update customers where account = "ADA0001" set creditlim = 1000
Update in X# is used when you want to update 1 workarea from another
workarea. REPLACE is the similar command.
REPLACE <idField> WITH <uValue> [, <idField> WITH <uValue>...] [<Scope>]
[WHILE <lCondition>]
[FOR <lCondition>] [[IN|ALIAS] <workarea>]
This is used as follow:
replace creditlim with 1000[, <rest>] for account = "ADA0001"
If you look at dbcmd.xh you will see a lot of these are actually handled
by 1 internal function DbEval(), all the commands are pre-processed into
variation of passed parameters.
FUNCTION DbEval( cbExecute AS USUAL, cbForCondition AS USUAL,
cbWhileCondition AS USUAL, nNext AS USUAL, nRecord AS USUAL, lRest AS
USUAL ) AS LOGIC
PS: By the way, are you using Visual Studio or XIDE for this work?
Visual Studio, as I am very familiar with it already.
Ok, you might want to at least check XIDE...
Johan
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: https://leafe.com/archives
This message:
https://leafe.com/archives/byMID/[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.