Testing an ODBC DSN using Excel
You can use Microsoft Excel to verify that an application can connect to an ODBC data source or other ODBC application.
-
Open Microsoft Excel, and select Data > Get External Data > From Other Sources > From Microsoft Query.
-
When the Choose Data Source dialog box opens:
-
Select New Data Source, and click OK.
-
Enter the name of the data source.
-
Select the Vertica driver.
-
Click Connect.
-
-
When the Vertica Connection Dialog box opens, enter the connection information for the DSN, and click OK.
-
Click OK on the Create New Data Source dialog box to return to the Choose Data Source dialog box.
-
Select VMart_Schema*, and verify that the Use the Query Wizard check box is deselected. Click OK.
-
When the Add Tables dialog box opens, click Close.
-
When the Microsoft Query window opens, click the SQL button.
-
In the SQL window, write any simple query to test your connection. For example:
SELECT DISTINCT calendar_year FROM date_dimension;
-
* If you see the caution, "SQL Query can't be represented graphically. Continue anyway?" click **OK**. * The data values 2003, 2004, 2005, 2006, 2007 indicate that you successfully connected to and ran a query through ODBC.
-
Select File > Return Data to Microsoft Office Excel.
-
In the Import Data dialog box, click OK.
The data is now available for use in an Excel worksheet.