I get incorrect results (mostly, the fields from the view are missing) unless I issue the same SQLEXEC twice when I execute:
lc_SQL = ;
"select * " + ;
" from ATABLE " + ;
" JOIN AVIEW " + ;
" on ATABLE.id=AVIEW.id AND ATABLE.a='b' "
sqlexec(ln_handle, lc_SQL, "myCursor")
where AVIEW is a view and ln_handle is an ODBC handle to a VFP DBC.
I get the problem only in the EXE but not in the VFP development environment.
It only happens for the first call to that view.
Subsequest calls only need to be issued once.
The problem is that I have a dynamic database and the the SQLEXEC could be a call to a table or a view. I do not want to call each SQLEXEC twice, even if it is to a view only.
Bharat Sanghvi
Vice President, Information Technology
Deyta
Continuous Quality Measurement Systems