Connecting to SQL from Excel

G

Guest

Can any one tell me what is the correct function(s) to connect to a SQL 2000
Database, run a query, and put it in the spreadsheet using VBA for Excel
2000. Thanks for any help in advance.
 
G

Guest

Hi, yes I can do it through Data=>Import Data in Excel, but I want to do it
programatically, through VBA.
 
G

Guest

Not trying to be difficult but why in VBA. Unless you need to write back to
the database, there are very few good reasons to do it through code? You can
record a macro of Data=>Import Data which is a whole lot easier than getting
into the ADO recordsets you need otherwise.
 
G

Guest

Hi, well I needed to do some complex string manipulation, but I figured out
how to do it. Thanks for all you help anyway.
 

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