oConnection = CreateObject("adodb.connection")
With oConnection
.ConnectionString = 'Provider=VFPOLEDB.1;Data Source=D:\ZZ;Password="";Collating Sequence=MACHINE'
.open
ENDWITH
tt="select a.* into dbf gd from jzg a left join (select * from jzg where !DELETED()) b;
on a.bh=b.bh where b.bh is null "
?LEN(tt)
oConnection.execute(tt)