Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQLEXEC returns incorrect data from views in a VFP database
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Client/server
Title:
SQLEXEC returns incorrect data from views in a VFP database
Miscellaneous
Thread ID:
00457178
Message ID:
00457178
Views:
99
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
Next
Reply
Map
View

Click here to load this message in the networking platform