PC Review


Reply
Thread Tools Rate Thread

ADO connection not always enabled

 
 
Vaughan B
Guest
Posts: n/a
 
      9th Jul 2003
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 With Quote
 
 
 
 
Bill
Guest
Posts: n/a
 
      10th Jul 2003
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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Internet connection disconnected when VPN connection enabled Valli Windows XP Help 1 26th Oct 2009 07:53 PM
LAN Connection Enabled but not Connected =?Utf-8?B?Q2hhcmxlcyBXaGlmZmlu?= Windows XP General 2 15th Jun 2006 04:13 PM
TCP/IP is not enabled for this connection - fireiwre David Dorn Windows XP Hardware 3 27th Feb 2005 10:53 PM
internet connection sharing cannot be enabled zipdapinhead Windows XP General 3 27th Jan 2004 02:45 AM
LAN 'TCP/IP is not enabled for this connection' Russell Windows XP Networking 0 17th Sep 2003 04:18 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:26 AM.