Retrive records from sql server to MS project via VBA?

E

Effie Ram

Following is a code that i have took from the help file in order to get sql
table's records into MS project file
'-----------------------

Set wrkODBC = CreateWorkspace("", "admin", "")
Set conPubs = wrkODBC.OpenConnection("DRIVER=SQL
Server;SERVER=serverName;UID=user1;PWD=pass1;APP=Microsoft® Windows®
Operating System;Network=DBMSSOCN;Address=ServerAddress;DATABASE=DB_name")
Set rstTemp = conPubs.OpenRecordset("SELECT * FROM tbl_EEs", dbOpenDynamic)

'------------------
....But, not working.
Any help will be appreciate, or other method to read from sql.
TIA, Effie.
 

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