Re: ADO reconnect after disconnect
From: Val Mazur (group51a_at_hotmail.com)
Date: 11/24/04
- Next message: Val Mazur: "Re: Merging 2 datasets raises System.IndexOutOfRange exception"
- Previous message: Val Mazur: "Re: vbajet32.dll failed to initialize reinstall the application"
- In reply to: john smith: "ADO reconnect after disconnect"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 23 Nov 2004 20:14:57 -0500
Hi,
Yes, it works this way. OLEDB does not monitor if connection was dropped for
some reason and in this case ADO will still show you that connection is
opened, even if was dropped some time ago. You cannot
reconnect recordset in this case. Only way to reconnect recordset is to
disconnect it first after you opened it. Then work with the data in a
disconnected recordset and reconnect it back to the database when you need
it. But if connection was dropped in a middle, you would need to reopen it
again anyway, but data in a recordset will stay.
-- Val Mazur Microsoft MVP "john smith" <jblack004@hotmail.com> wrote in message news:cnvhs5$ila$1@ctb-nnrp2.saix.net... > Hi, > If I set an ADOConnection to keep the connection open during queries, I > have a problem reconnecting should I be disconnected due to network > failure. Everytime I try to reconnect after being disconnected the > ADOconnection reports it has connected even with the network cable > unplugged. I also cant close the connection after being disconnected. > > At the moment the only way around seems to be to destroy the ADO > components and recreate the tables and datasets and then simply start the > connection from the beginning. I am able to detect when I am disconnected. > > Thanks for any help, > S. >
- Next message: Val Mazur: "Re: Merging 2 datasets raises System.IndexOutOfRange exception"
- Previous message: Val Mazur: "Re: vbajet32.dll failed to initialize reinstall the application"
- In reply to: john smith: "ADO reconnect after disconnect"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|