How do you code to get SQL Server data from ODBC Connection?

W

Webtechie

Hello,

I have an Excel application that I've written that is on a local network.
It retrieves SQL Server data by creating a connection using
"Provider=SQLOLEDB;".

It is working so well, they wanted me to create a vpn and let other offices
(physically separate buildings) use the application.

I've created an ODBC that accesses the data via the vpn.

However, I'm not sure of the syntax to retrieve SQL Server data via an ODBC.
I've been googling for awhile now. I haven't found an example of querying
on a SQL Server in VBA code via ODBC.

Anyone know the syntax to create an ODBC connection to SQL Server from Excel
2007?

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top