Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQLEXEC returns incorrect data from views in a VFP datab
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00457178
Message ID:
00457304
Views:
20
Possibly your code does not wait until entire view is loaded.
Try to set View fetchsize to -1.

Best Wishes
>>>>>>>>>>>>>>>>>your message below
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
Previous
Reply
Map
View

Click here to load this message in the networking platform