I use SQL pass-through's to SQL Server. Lately i had problems like cursor's that were not created but were created when i changed the order in which i issued the SQLEXEC's or executed them twice.
But when i changed SQLEXEC(nHandle,,) into:
SQLPREPARE(nHandle,,)
DO WHILE SQLEXEC(nHandle) = 0
ENDDO
IT WORKED !?!?!?!
So my problem is solved but i realy don't understand.
SqlGetProp(nHandle, 'batchmode') returns .T.
I thought when batchmode is set to .T. FoxPro doesn't go to the next line of code until all the data is retreived.
When i change the code into:
SQLPREPARE(nHandle,,)
x=1
DO WHILE SQLEXEC(nHandle) = 0
x = x + 1
ENDDO
?x
x is at least 2 and sometimes even > 100
Thanks for any reply,
Marco Beuk.
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