ADODB.Connections Error

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello, I am attempting setup a little bit of code that will allow me to
connect to my SQL database and run a pre-existing stored procedure. It seems
simple enough, but I get an error before the sub even runs. It is hanging up
on the:
DIM cnt as New ADODB.connection and
DIM rst as NEW ADOdb.recordset

I am getting a message that states Compile error: Can't find project or
library.

Has anyone esle ever seen this? What should I do.

Any help is highly appreciated. thx
 
Hi
Assuming you are in the Excel VB Editor, go to Tools, References and
click on the "Microsoft ActiveX Data Objects 2.5 Library".
You need to tell Excel what the objects are that you are defining (it
will also give you dropdown menus for methods/properties).
regards
Paul
 

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

Back
Top