Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default ADO connection not always enabled

Hi,

We have an excel application that we have added some ADO
code to import data from a SQL Server database (Excel
2002, WinXP, connected to SQL Server 2000 via UDL file,
ADO 2.5). We moved to an ADO connection due to more
flexibility with SQL statements than query defs.

There have been a number of random occurrences where a
user has opened the application, but the VBA/ADO
code/connection does not seem to run (application never
seems to prompt user to enable macros when this
happens). When this does happen, excel app opens up
fine, but ADO queries/code never run for specified events
(no error messages). Simply closing and opening the
application several times seems to somehow fix this
problem.. Is there a known reason for this? This is my
second post (hopefully someone will have an idea where to
look).

Thanks,
Vaughan

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default ADO connection not always enabled

Hi,

According to my experience, before run the query, it is
better to run the application to connect the database. And
after get data from database, close the connection. I
think you'd better check your code sequence and make sure
that the connection is built before run the query.

Rgs

Bill


-----Original Message-----
Hi,

We have an excel application that we have added some ADO
code to import data from a SQL Server database (Excel
2002, WinXP, connected to SQL Server 2000 via UDL file,
ADO 2.5). We moved to an ADO connection due to more
flexibility with SQL statements than query defs.

There have been a number of random occurrences where a
user has opened the application, but the VBA/ADO
code/connection does not seem to run (application never
seems to prompt user to enable macros when this
happens). When this does happen, excel app opens up
fine, but ADO queries/code never run for specified events
(no error messages). Simply closing and opening the
application several times seems to somehow fix this
problem.. Is there a known reason for this? This is my
second post (hopefully someone will have an idea where to
look).

Thanks,
Vaughan

.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro-Enabled saving MReed Excel Discussion (Misc queries) 1 January 4th 10 02:59 PM
why is freeze panes not enabled? Jerry Charts and Charting in Excel 0 May 10th 08 03:48 AM
AutoFilter is not enabled paula Excel Discussion (Misc queries) 1 December 19th 07 02:33 PM
always recheck data connection library for latest connection strin FurmanGG Excel Discussion (Misc queries) 0 September 14th 07 04:48 PM
Select All enabled Trilix Setting up and Configuration of Excel 2 January 12th 07 06:23 PM


All times are GMT +1. The time now is 04:57 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"