Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Application like 'hang'
Message
 
 
To
07/10/2004 02:53:50
Florence Lee
Visual Solutions (M) Sdn Bhd
Kuala Lumpur, Malaysia
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00949436
Message ID:
00949517
Views:
8
Florence,

> When my application connect to the sql server (c/s), normally i retrieve the records out very fast but sometimes it hang and no response. What could have happened? Is it deadlock ?

You should go to the SQL management tool and find out what SQL command is taking so long, these tools can also tell you if there is a locking condition involved.

What are your SQLSetProps for the connection?

> Sometimes, the sql server already disconnected but i can not catch out this fast so my application take a very long time still haven't finish to run an transaction. How to prevent this and if i dun want to put try and catch at every records but i want an instance response to let me prompt out a proper message that my application has failed.

In general you should always check the return values of the SQL* functions. If the return value indicates an error condition, you need to call aerror() to get more detailed information. A lot of people write their own wrapper functions/methods so that they have consistent handling of SQL errors.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform