Hi Dexter,
Here's a #command for USE taken (and slightly modified) from VO:
Code: Select all
#command USE <db> ;
[VIA <rdd>] ;
[ALIAS <a>] ;
[<sh:SHARED>] ;
[<ex:EXCLUSIVE>] ;
[<ro:READONLY>] ;
[<nw:NEW>] ;
;
=> DBUseArea(<.nw.>, <rdd>, <(db)>, <(a)>, iif(<.sh.> .or. <.ex.>, !<.ex.>, FALSE), <.ro.>)
You can copy/paste it in a X# app and use it like this:
Code: Select all
FUNCTION Start() AS VOID
USE "C:dbfcustomer.dbf" VIA "DBFCDX" ALIAS test
RETURN
FUNCTION DBUseArea(lNew AS LOGIC, cRdd AS STRING, cFileName AS STRING , cAlias AS STRING , lShared AS LOGIC , lReadOnly AS LOGIC) AS LOGIC
? lNew , cRdd , cFileName , cAlias , lShared , lReadOnly
RETURN TRUE
it translates to a call to DBUseArea(), because that's what VO uses for (non-OOP) dbf access, but you can change it to translate into code calling your classes if you want.
I think all features of the Clipper preprocessor are now supported by X#.
Chris