General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
>>When executing SPT-Select against databases ( both locally and remotely) we often receive inconsistent return cursor unless SELECT-SQL contains "ORDER BY" or "GROUP BY" clause.
>>Is there a fix for this problem ?
>
>My guess is incorrect SQL being used. What does the SQL look like and what is the database? Oracle? SQL Server? VFP?
The database is VFP.
1. SELECT expression that returns inconsistently:
lcStrSQL = " SELECT p.* FROM arperend p " + ;
" WHERE p.pedPerEnd = {" + DTOC(ldPeriodEnd) + "} "
2. SELECT expression that returns consistently:
lcStrSQL = " SELECT p.* FROM arperend p " + ;
" WHERE p.pedPerEnd = {" + DTOC(ldPeriodEnd) + "} " + ;
" ORDER by peiacct "
3. SQL query commands:
SqlPrepare(lnhandle, lcStrSQL, lccursor)
SqlExec(m.lnhandle)
p.pedPerEnd - field date-type
ldPeriodEnd - variable date-type
lnhandle - connection handle
Thanks
Ed
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only