View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Candyman Candyman is offline
external usenet poster
 
Posts: 66
Default Posting Recordset to SQl Server

HI,
I normally query a db2 Database into Excel for reporting. Now I have to run
the SQL code to extract from DB2 and then post to SQL Server.

How do I do that?

my code to retrieve data is:
With ActiveSheet.QueryTables.Add(Connection:=ConnectStr ing,
Destination:=Range(DataTarget), Sql:=mySQL)
.Refresh BackgroundQuery:=False
End With

Please Help
Thanks