Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What to do when a shared connection gets busy?
Message
De
27/04/2005 23:35:29
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
What to do when a shared connection gets busy?
Divers
Thread ID:
01009096
Message ID:
01009096
Vues:
52
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.com
Success 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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform