Intermittent connection failure

Intermittent connection failure

Post by Sham » Tue, 20 Sep 2005 19:53:09


Hi to all,

I am using TADOQuery component with the OLE DB provider for SQL Server. I
have an object that when it is first created creates the TADOQuery object in
code. Then I execute the SQL statement when I call FQuery.Open..
When I close the app, I then free the TADOQuery object.

Calling FQuery.Open a number of times seems to work fine (i.e. I do
TADOQuery.SQL.Clear when using a new sql string). If I leave the app for
about 5 minutes or so, and then execute a query, I get a connection failure
exception. This seems to happen in the unit ADODB at

procedure TCustomADODataSet.OpenCursor(InfoQuery: Boolean);
const
AsyncOptions = [eoAsyncExecute, eoAsyncFetch, eoAsyncFetchNonBlocking];
var
...
var
VarRecsAffected: OleVariant;
begin
if not Assigned(Recordset) then
begin
InitializeConnection;
InitializeRecordset;
Recordset.Open(Source, ActiveConnection,
CursorTypeValues[FCursorType], LockTypeValues[FLockType],
Integer(CommandTypeValues[CommandType]) +
ExecuteOptionsToOrd(ExecuteOptions));
while Recordset.State = adStateClosed do


on RecordSet.Open method.

I read in one thread that I should recreate TADOQuery everytime I use it
rather than use the same one. Clearly this will hit performance so I am not
sure if this is the solution.

Sham.

Ps. I am also using a TDataSetProvider and a TClientDataSet component which
are created in code.
 
 
 

1. Intermittent Connection Failure Error

2. Intermittent Connection Failure

XP SP2. Netgear ADSL Modem Wireless Router.

All equipment was working fine until I asked my ISP (British Telecom) for a
speed increase from 1mps to 3. I expected some degradation in the service
whilst they carried out tests. It now been a month. I nearly always have to
turn my router off and then on again to get a connection from start up. The
connection can last for a couple of hours sometimes a matter of minutes. I
have to reboot my router to get the connection back. I have spoken to the
technical help people who frankly are not the most helpful. Language barrier
I think. I have carried out all their requests such as unplugging everything.
Clearing out my cookies/Temp files. I have Norton Anti Virus installed.

3. home rdp connection to office workstation intermittent failure

4. Intermittent DB connection failure

5. Intermittent Exchange client connection failure

6. Connection Options MSDN example failure, scope connect failure

7. Intermittent Report Failure to Print

8. Intermittent Web Service Response Failures

9. Intermittent Failure to respond

10. Xml Serialization Intermittent Failure

11. Intermittent Delivery Failure over VPN Tunnel

12. Intermittent Server Publishing Failure

13. Vista - Intermittent failure to connect to the network

14. Intermittent Failure When Accessing DB Constantly?

15. Intermittent failure with VPN client on MacOS X.2