Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Property BatchMode
Message
 
To
30/10/1998 03:38:31
Marco Beuk
Innovero Software Solutions
The Hague, Netherlands
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00152628
Message ID:
00152681
Views:
20
Marco,

Make sure the connection you are using is not set for asynchronous operation. If it is, one command may not be completed when the other starts. That causes a "Connection is Busy" error. If that doesn't help, use AERROR() after your SQLEXEC() returns 0 to find out what error was returned by the ODBC driver.

>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform