View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default Something embarrassing with ADODB

How are you closing/destroying your objects once finished ?

NickHk

"Jean-Pierre Bidon" wrote in message
...
Hi,
I am using ADODB in a VBA Excel application to get data in a closed Excel
workbook, in order to avoid to open it, while another working workbook is
open. ADO requires to open a connexion, each sheet with the proper format
could then possibly be a recordset or source of an SQL request.
It works perfectly ... however, when I close a recordset, the workbook

keep
a "read only" status for a while; then, an alert message is issued by the
system if I try to reopen the same source too early after.
It is to be noted that it is independant of the "LockType" selected when
opening the recordset.
In fact, I'd like to remove the alert window and also to change if

possible
the Lock status of the workbbok(ie. "read only" to "read/write") . If it

is
not possible, I'd like, at least, to access to this status so to ask the
user to wait until automatic status change by windows and avoid the system
alert message. I would prefer to be able to manage myself the 'on hold'
situation.
I'm sorry, it looks a little bit complicated !
--
Jean-Pierre Bidon
Interstat
5 place de la République
75003 Paris
Tél: 01 45 49 19 17