Hi Guys,
I created a program that uses remote views having a shared connection. I use this technique in order to send a begin transaction in SQL Server 2000 so that, if anything goes wrong I could easily rollback all changes.
The problem starts if I apply this technique in a scan loop. I get a connection is busy message. I tried to handle the error using VFP's SQLGetProp(nConnectionHandle, "ConnectBusy") just to know if the current connection is bussy. If the code returns .T. the program will wait 1 second and then try again.
Here is my sample code
do while SQLGetProp(nConnectionHandle, "ConnectBusy")
wait window 'Connection is Busy. Please wait' timeout 1
enddo
the problem here is that when the connection gets busy it gets the program into an infinite loop. It seems that the connection's state is always and forever busy.
any idea?
Thanks in advance
Music Rocks
www.musicreserve.blogspot.comSuccess is 1% Inspiration & 99% Perspiration
God Sometimes Delays His Help to Test Our Faith and Energize Our Prayers
Our Boat May Be Tossed While He Sleeps, But He Wakes Up Before it Sinks.