Larry,
Thanks. I realize that now, as Bob Archer responded to me as well. I had not carefully read the documentation on the sqlexec() return value. I had always used synchronous SPT so I was not familiar with the techniques for asynchronous.
>David,
>With asynchronous SPT, you need to execute SQLExec() continually until it returns a value other than 0 (still executing). SQLMoreResults() is used when the back end returns multiple result sets and the BatchMode property is set to .F. (0).
>
>HTH.
>
>>I received the error:
>>
>>Invalid call issued while executing a SQLEXEC( ) sequence (Error 1474)
>>
>>
>>when executing the code below. Actually, this was just test code that I set up in the hope of debugging the error:
>>
>>Invalid call issued while executing a SQLMORERESULTS( ) sequence (Error 1475) in another context.
>>
>>I wanted to execute code in the way that I understood it to be recommended when asynchronous is .t. and batchmode is false. My understanding was that I would execute sqlmoreresults repeatedly until It returned 2 - no more data.
>>I don't know what is wrong with this code.
>>
>>The vfp help for error 1474 says:
>>
>>An invalid SQL pass-through (SPT) function call has been made while a SQLEXEC( ) call was expected to continue the SPT call sequence in progress.
>>
>>I don't understand what they mean when they say a sqlexec() call was expected to continue the spt call. I thought I am supposed to issue sqlmoreresults - not reissue sqlexec().
>>
>>Can someone explain this to me?
>>
>>In the other case, the help for error 1475 says:
>>
>>
>>An invalid SQL pass-through (SPT) function call has been made while a SQLMORERESULTS( ) call was expected to continue the SPT call sequence in progress. Call SQLCANCEL( ) to cancel the SPT sequence or make valid SPT calls to finish the call sequence.
>>
>>This makes sense to me - I got error 1475, when I tried to execute a NEW SPT STATEMENT, with the same connection handle, before the current one was finished executing, because, I think, sqlmoreresults() had not yet returned 0. (unfortunately, I can't see the sqlmoreresults code executing - it is locked up in an exe for a portion of a system that I don't have access to (Visual accountmate accounting - which hides pieces of its source)
>
>*snip*
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