Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Union of Views

Author  Topic 

Kyriakos
Starting Member

13 Posts

Posted - 2007-10-31 : 06:22:28
For a Union All of Views where both views look at the same openrowset file I get

[OLE/DB provider returned message: Unspecified error]
OLE DB error trace [OLE/DB Provider 'Microsoft.Jet.OLEDB.4.0' IDBInitialize::Initialize returned 0x80004005: ].
Msg 7399, Level 16, State 1, Line 2
OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error.

This probably occurs because the first view keeps the file open.

Any workarounds on this?

nr
SQLTeam MVY

12543 Posts

Posted - 2007-10-31 : 09:12:57
Populate a temp table?

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-11-01 : 02:20:56
I dont think it will give the error
Make sure to read this thread
http://sqlteam.com/forums/topic.asp?TOPIC_ID=49926

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

Kyriakos
Starting Member

13 Posts

Posted - 2007-11-02 : 05:26:34
Populating a temp table is certainly a way. There's no -known to me- way of creating a new view that contains drop, create statements and I need the whole result as a new view, so I can fill a table adapter (through .NET). Creates and drops are out of the question.
The way I'm using it now is similar. I use a scheduled task to create a new table. This has its limitations - scheduler checks, server downs, not realtime data.
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2007-11-02 : 07:59:17
Why not put it in a stored proc?

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -