DBP_FETCHTHROUGH - SQLBase good, SQLServer bad

General discussion forum about all databases other than SqlBase.
User avatar
Steve Leighton
Site Admin
Site Admin
New Zealand
Posts: 341
Joined: 05 Mar 2017, 20:57
Location: Stroud, England <--> Tauranga, New Zealand

DBP_FETCHTHROUGH - SQLBase good, SQLServer bad

Post by Steve Leighton » 16 Feb 2020, 04:22

Has anyone experienced having to build a Result-set, update a single row in the Result-set, then re-fetch the newly updated row using SqlFetchRow().

In SQLBase, one simply forces a re-read direct from the dB, rather re-reading the Result-Set cache, by setting DBP_FETCHTHROUGH first. Works a treat.

But SQLServer insists on re-reading from the original Result-Set no matter what. DBP_FETCHTHROUGH is ignored, resulting in the pre-updated value being returned every time.
Short of re-building and fetching the entire Result-Set, or upgrading to SQLBase :D , has anyone any ideas ?

I've tried:
- SqlCommit(hSql),
- SqlResultSet(hSql,FALSE),
- If SqlPrepareAndExecute( hSql1, 'CHECKPOINT' )

before the SqlFetchRow()

but SQLServer doggedly returns the old pre-Updated values from the Result-Set ( not the back-end ).

Any clues ?
Greetings from New Zealand
Steve Leighton

Bankside Systems Ltd.
UK ♦ Australia ♦ New Zealand



Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 0 guests