using Project 200x OLEDB provider from SQL 
Author Message
 using Project 200x OLEDB provider from SQL

Hi all!

I need to get some data from MS Project 2000 through its
OLE DB provider (the only source, since it's not exposed
in DB).  Nature of the solution is asking that the code is
a SQL stored procedure.  The environment has project plans
stored in a SQL DB (7 or 2000) on Win2000 server.  Same
functionality is also tested and projected for Project
2002 beta 4 on SQL2000.

I'm trying to execute the following variations in Query
Analyzer (I even went down to a single-file example):

a) select * from openrowset('Microsoft.Project.OLEDB',
     'DSN';'admin';'', Project)

b) select * from openrowset('Microsoft.Project.OLEDB',
     '<DSN>\Project1';'admin';'', Project)

c) select * from openrowset('Microsoft.Project.OLEDB',
     'User ID=admin;Data Source=DSN;Project
Name=Project1;Initial Catalog=Project1', Project)

d) select * from openrowset('Microsoft.Project.OLEDB',
     'Z:\PATH\Project1.mpp';'admin';'', Project)

and get the following results:

a) Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'Microsoft.Project.OLEDB' reported an
error.
[OLE/DB provider returned message: Cannot find
file '<DSN>\']

b) Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'Microsoft.Project.OLEDB' reported an
error.
[OLE/DB provider returned message: Cannot find
file '<<DSN>\Project1>\']

c) Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'Microsoft.Project.OLEDB' reported an
error.
[OLE/DB provider returned message: Cannot open project '']

d) Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'Microsoft.Project.OLEDB' reported an
error.  
[OLE/DB provider returned message: Cannot find
file '<Z:\PATH\Project1.mpp>\']

There're several things that are not clear:

The Net is full of examples of accessing OLE DB sources
like Access or Oracle.  There's not a single one that I
could find showing the intricasies of Project provider.

Project's OLE DB provider exposes data through several
pseudo-tables (Project, Tasks, Resources, etc.) for only
one plan!  You choose which one when you establish
connection.  In VB code using ADO 2.5 I simply specify the
following connection string:

Provider=Microsoft.Project.OLEDB;User
ID=admin;Password=;Data source=DSN;Initial
Catalog=Project1;Project name=Project1;

and can execute 'select's from any of provider tables.
First I had to create a .udl file to figure out what to
use to specify the project plan I'm interested in, but
even here this value seems to be duplicated in 'Project
name' and 'Initial Catalog' properties.

According to documentation on OPENROWSET() you can
give 'catalog' and 'schema' to qualify referenced object.  
In my case the object is one of the tables, say 'Project',
but what should I use for 'catalog' or 'schema'?  I tried
feeding "Project1" (plan's name) as the catalog, since
I've no idea who should be the owner, I asked for
object "Project1..TableName".  No matter what though I
still end up with same connection errors...

Has anyone done something similar, or have any knowledge
on Project OLE DB provider that could explain the errors
and help resolve it?  I appreciate every effort!

Thanks,
Dmitri



Tue, 19 Oct 2004 05:44:29 GMT  
 using Project 200x OLEDB provider from SQL
Hi,

My understanding is that you use the Project,oledb only to read from .mpp
files. To read from SQL Server user the standard SQL-OLEDB driver.  Project
2002 will expose more tables that Project 2000. Both are read only.

--

Visit www.mvps.org/project/ for the Project MVP's FAQ and third party
add-ons

Rod Gill
Microsoft Project MVP
Visit www.projectlearning.com for customized Project and Office VBA macros
and Project companion software


Quote:
> Hi all!

> I need to get some data from MS Project 2000 through its
> OLE DB provider (the only source, since it's not exposed
> in DB).  Nature of the solution is asking that the code is
> a SQL stored procedure.  The environment has project plans
> stored in a SQL DB (7 or 2000) on Win2000 server.  Same
> functionality is also tested and projected for Project
> 2002 beta 4 on SQL2000.

> I'm trying to execute the following variations in Query
> Analyzer (I even went down to a single-file example):

> a) select * from openrowset('Microsoft.Project.OLEDB',
>      'DSN';'admin';'', Project)

> b) select * from openrowset('Microsoft.Project.OLEDB',
>      '<DSN>\Project1';'admin';'', Project)

> c) select * from openrowset('Microsoft.Project.OLEDB',
>      'User ID=admin;Data Source=DSN;Project
> Name=Project1;Initial Catalog=Project1', Project)

> d) select * from openrowset('Microsoft.Project.OLEDB',
>      'Z:\PATH\Project1.mpp';'admin';'', Project)

> and get the following results:

> a) Server: Msg 7399, Level 16, State 1, Line 1
> OLE DB provider 'Microsoft.Project.OLEDB' reported an
> error.
> [OLE/DB provider returned message: Cannot find
> file '<DSN>\']

> b) Server: Msg 7399, Level 16, State 1, Line 1
> OLE DB provider 'Microsoft.Project.OLEDB' reported an
> error.
> [OLE/DB provider returned message: Cannot find
> file '<<DSN>\Project1>\']

> c) Server: Msg 7399, Level 16, State 1, Line 1
> OLE DB provider 'Microsoft.Project.OLEDB' reported an
> error.
> [OLE/DB provider returned message: Cannot open project '']

> d) Server: Msg 7399, Level 16, State 1, Line 1
> OLE DB provider 'Microsoft.Project.OLEDB' reported an
> error.
> [OLE/DB provider returned message: Cannot find
> file '<Z:\PATH\Project1.mpp>\']

> There're several things that are not clear:

> The Net is full of examples of accessing OLE DB sources
> like Access or Oracle.  There's not a single one that I
> could find showing the intricasies of Project provider.

> Project's OLE DB provider exposes data through several
> pseudo-tables (Project, Tasks, Resources, etc.) for only
> one plan!  You choose which one when you establish
> connection.  In VB code using ADO 2.5 I simply specify the
> following connection string:

> Provider=Microsoft.Project.OLEDB;User
> ID=admin;Password=;Data source=DSN;Initial
> Catalog=Project1;Project name=Project1;

> and can execute 'select's from any of provider tables.
> First I had to create a .udl file to figure out what to
> use to specify the project plan I'm interested in, but
> even here this value seems to be duplicated in 'Project
> name' and 'Initial Catalog' properties.

> According to documentation on OPENROWSET() you can
> give 'catalog' and 'schema' to qualify referenced object.
> In my case the object is one of the tables, say 'Project',
> but what should I use for 'catalog' or 'schema'?  I tried
> feeding "Project1" (plan's name) as the catalog, since
> I've no idea who should be the owner, I asked for
> object "Project1..TableName".  No matter what though I
> still end up with same connection errors...

> Has anyone done something similar, or have any knowledge
> on Project OLE DB provider that could explain the errors
> and help resolve it?  I appreciate every effort!

> Thanks,
> Dmitri



Wed, 20 Oct 2004 05:54:49 GMT  
 using Project 200x OLEDB provider from SQL
What data are you trying to retrieve?

--
Please try to keep replies in this group. I do check e-mail, but only
infrequently.
For Macros and other things check http://masamiki.com/project

-Jack Dahlgren, Project MVP

+++++++++++++++++++

Quote:
> Hi all!

> I need to get some data from MS Project 2000 through its
> OLE DB provider (the only source, since it's not exposed
> in DB).  Nature of the solution is asking that the code is
> a SQL stored procedure.  The environment has project plans
> stored in a SQL DB (7 or 2000) on Win2000 server.  Same
> functionality is also tested and projected for Project
> 2002 beta 4 on SQL2000.

> I'm trying to execute the following variations in Query
> Analyzer (I even went down to a single-file example):

> a) select * from openrowset('Microsoft.Project.OLEDB',
>      'DSN';'admin';'', Project)

> b) select * from openrowset('Microsoft.Project.OLEDB',
>      '<DSN>\Project1';'admin';'', Project)

> c) select * from openrowset('Microsoft.Project.OLEDB',
>      'User ID=admin;Data Source=DSN;Project
> Name=Project1;Initial Catalog=Project1', Project)

> d) select * from openrowset('Microsoft.Project.OLEDB',
>      'Z:\PATH\Project1.mpp';'admin';'', Project)

> and get the following results:

> a) Server: Msg 7399, Level 16, State 1, Line 1
> OLE DB provider 'Microsoft.Project.OLEDB' reported an
> error.
> [OLE/DB provider returned message: Cannot find
> file '<DSN>\']

> b) Server: Msg 7399, Level 16, State 1, Line 1
> OLE DB provider 'Microsoft.Project.OLEDB' reported an
> error.
> [OLE/DB provider returned message: Cannot find
> file '<<DSN>\Project1>\']

> c) Server: Msg 7399, Level 16, State 1, Line 1
> OLE DB provider 'Microsoft.Project.OLEDB' reported an
> error.
> [OLE/DB provider returned message: Cannot open project '']

> d) Server: Msg 7399, Level 16, State 1, Line 1
> OLE DB provider 'Microsoft.Project.OLEDB' reported an
> error.
> [OLE/DB provider returned message: Cannot find
> file '<Z:\PATH\Project1.mpp>\']

> There're several things that are not clear:

> The Net is full of examples of accessing OLE DB sources
> like Access or Oracle.  There's not a single one that I
> could find showing the intricasies of Project provider.

> Project's OLE DB provider exposes data through several
> pseudo-tables (Project, Tasks, Resources, etc.) for only
> one plan!  You choose which one when you establish
> connection.  In VB code using ADO 2.5 I simply specify the
> following connection string:

> Provider=Microsoft.Project.OLEDB;User
> ID=admin;Password=;Data source=DSN;Initial
> Catalog=Project1;Project name=Project1;

> and can execute 'select's from any of provider tables.
> First I had to create a .udl file to figure out what to
> use to specify the project plan I'm interested in, but
> even here this value seems to be duplicated in 'Project
> name' and 'Initial Catalog' properties.

> According to documentation on OPENROWSET() you can
> give 'catalog' and 'schema' to qualify referenced object.
> In my case the object is one of the tables, say 'Project',
> but what should I use for 'catalog' or 'schema'?  I tried
> feeding "Project1" (plan's name) as the catalog, since
> I've no idea who should be the owner, I asked for
> object "Project1..TableName".  No matter what though I
> still end up with same connection errors...

> Has anyone done something similar, or have any knowledge
> on Project OLE DB provider that could explain the errors
> and help resolve it?  I appreciate every effort!

> Thanks,
> Dmitri



Wed, 20 Oct 2004 06:40:16 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Help using OLEDB provider with Project file

2. No OLEDB 9.0 provider in Project 2002 ?

3. Problem with Float columns and OLEDB Provider for SQL

4. Problem with Float columns and OLEDB Provider for SQL

5. Query/Recordset problem on inner join with sql oledb provider

6. OLEDB Provider Issues: ODBC Drivers vs Sql Server

7. Determine cause of Error from OLEDB Provider for SQL 7.0

8. OLEDB Provider Error - Supplied Provider is different from the one already in use

9. Problem using OLEDB provider for Jet 3.51

10. How to connect to access 2000 using oledb provider

11. How to set Format property in ACCESS2k thru ADOX using JET OLEDB 4.0 provider

12. Resync method using Oracle OLEDB provider

 

 
Powered by phpBB® Forum Software