ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Posting Recordset to SQl Server (https://www.excelbanter.com/excel-programming/392422-posting-recordset-sql-server.html)

Candyman

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


All times are GMT +1. The time now is 04:19 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com