Ok, so far so good. It would be usefull to know if the foxpro commands like SQLCONNECT are really wrappers over ODBC or not. One interesting thing in the msdn documention about for SQLGETPROP is this:
Parameters
nConnectionHandle
Specifies the connection handle to the data source returned by SQLCONNECT( ).
The key thing here is you get the connection handle returned NOT the statement handle which is what you want. You might be able to prove this by issueing something like
xx = SQLGETROP(handle,"DataSource"

which should return the original data source name. You might have to look at the manuals for exact details. However this just gives us some background, we still need to get to the statement handle.
Looking at the documentation it seems that SQLEXEC (which i presume you are using) can take a prepaired statment (done using SQLPREPARE). When you use SQLPREPARE it looks like you get a statment handle back, so you could try:
x="delete where fred=1"
stmt=SQLPREPARE(x)
SQLEXEC
SQLROWCOUNT(stmt)
or words to that effect, it's ages since I used ODBC at API level but I'm sure the SQLPrepare call uses statment handles.
If all else fails you could wrap the functions you need e.g.
handle creation,connect,prepare, execute and rowcount and use those ignoring the foxprop stuff all together. A usefull link is
keep in touch, id like to know how you get on
Kevin