LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Query to DB2

What is the best coding and connection to run against a DB2 database?
I can get something like to work but is it the best?
I want to loop through many files and SQLs so I need the program to wait for
the data to return before going to the next command.

With ActiveSheet.QueryTables
..Add(Connection:=ConnectString, Destination:=Range(DataTarget), Sql:=mySQL)
..Refresh (BackgroundQuery = False)
End With
I am going against an ODBC to a DB2 database and I was not sure if I was
doing this connection right or should I establish a an ADO connection use ,
create a querry, and return a record set? Do I need an ADO? Not sure how, as
I have seen some snipits of ADO, but not the whole thing so I am not sure
how to put it togheter.

The SQL works. ;)

Confused






 
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
Convert hard coded query criteria to Parameter Query Melanie[_2_] Excel Discussion (Misc queries) 0 July 15th 08 09:59 PM
Excel 2007 / MS Query - editing existing query to another sheet Hotpepperz Excel Discussion (Misc queries) 0 June 13th 08 06:53 PM
Save data retreived from query without saving query Anthony Excel Discussion (Misc queries) 0 January 25th 06 07:17 PM
Stop to modify the SQL query manually entered into query ! Olivier Rollet Excel Programming 6 November 3rd 04 08:34 AM
Problem with .Background Query option of ODBC Query Shilps Excel Programming 0 April 19th 04 06:41 AM


All times are GMT +1. The time now is 11:07 PM.

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

About Us

"It's about Microsoft Excel"