USE is not a function but a command in VFP, which you may not call from an ODBC link. You may call a series of functions (but not all) via ODBC. I don't think sys() would be a supported function through ODBC and that makes sense to me. ODBC driver is also limited accessing say stored procedures. Use VFPOLEDB driver instead. Check supported/unsupported command/functions with OLEDB driver (some of the functions and commands are only supported through stored procedures).
Foxpro API LCK might have something for you to use from within C++ (I don't know, I used it only for creating functions in C that are callable from VFP and its purpose is utilizing C from VFP AFAIK). Check its documentation anyway.
VFP also has an Application object which you might use for automation from other clients.
With ODBC driver I wouldn't try to use commands other than DDL/DML.
|