Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Dynamic SQL Query


Is it possible to execute a query independant of a worksheet? For
example to run a query that will return data to a variable?


--
fazstp
------------------------------------------------------------------------
fazstp's Profile: http://www.excelforum.com/member.php...o&userid=30574
View this thread: http://www.excelforum.com/showthread...hreadid=502211

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default Dynamic SQL Query

Yes. Look at ADO: this can be used in a macro without any worksheet
involvement.
I'm assuming you mean *database* query (not web query)





--
Tim Williams
Palo Alto, CA


"fazstp" wrote in
message ...

Is it possible to execute a query independant of a worksheet? For
example to run a query that will return data to a variable?


--
fazstp
------------------------------------------------------------------------
fazstp's Profile:

http://www.excelforum.com/member.php...o&userid=30574
View this thread: http://www.excelforum.com/showthread...hreadid=502211



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Dynamic SQL Query

Tim's right, ADO is the way to go. Check out:

http://www.access-programmers.co.uk/...ad.php?t=59811

Shows how to return an ADO dataset independent of any other object.

"fazstp" wrote:


Is it possible to execute a query independant of a worksheet? For
example to run a query that will return data to a variable?


--
fazstp
------------------------------------------------------------------------
fazstp's Profile: http://www.excelforum.com/member.php...o&userid=30574
View this thread: http://www.excelforum.com/showthread...hreadid=502211


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Dynamic SQL Query


Cool, thanks for that. I'll look into it.

Basically I'm using excel to query an old dos database and the data
returned is too big to fit into a worksheet. I'm hoping to return the
data to a variable so I can sort it into seperate tables.


--
fazstp
------------------------------------------------------------------------
fazstp's Profile: http://www.excelforum.com/member.php...o&userid=30574
View this thread: http://www.excelforum.com/showthread...hreadid=502211

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
db query with dynamic criteria Stanley Excel Discussion (Misc queries) 1 January 19th 06 07:47 PM
Dynamic Web Query from VBA ThisShouldBeEasy Excel Programming 3 May 24th 05 10:05 PM
Dynamic use of Access query Laurent M Excel Programming 1 January 24th 05 09:58 AM
Web Query and Dynamic web address joev7777 Excel Programming 0 October 15th 04 09:11 PM
Dynamic Web Query Amanda MMW Excel Programming 3 June 14th 04 07:24 PM


All times are GMT +1. The time now is 08:33 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"