Professional Documents
Culture Documents
Usage:
The example uses an existing database hosted in Microsoft Azure SQL Database.
Just open a workbook and click the Import and Export buttons.
1. Using ADO
2. Using the SaveToDB add-in
Here is the basic code for importing data using the QueryTable object:
With .QueryTable
.CommandType = xlCmdSql
.CommandText = Array(query)
End With
End With
With rst
.Source = "SELECT * FROM " & table
.Open
Here is the basic code for exporting data using the SaveToDB add-in:
addInObj.Save