Friday, March 23, 2012
INVALID OBJECT NAME Error
I am using ASP and SQL Server 2000 for an application. The problem that i am facing is that I get INVALID OBJECT NAME error. to be precise...
"Error Type:
Microsoft OLE DB Provider for SQL Server (0x80040E37)
Invalid object name '<table name>'"
the application runs for some days without any issues then suddenly it starts showing the error. When the error starts coming.. it appears in all the screens that were running without any issues just moments back. The only solution which works is to log o
ut of the application and login again.
Please suggest what could be the cause of the error...
If you need any more information just let me know...
Regards
Jaspreet
When you get the errors, check the connections to see what
database context is being used by the web clients. You can
capture this information in many ways such as with Profiler,
sp_who, sp_who2, querying sysprocesses, checking the Current
Activity node in Enterprise Manager, etc. It could be that
the database context is changing. You could also try fully
qualifying the object with database.owner.object in whatever
code you are using.
-Sue
On Sat, 5 Jun 2004 05:26:02 -0700, "Jaspreet"
<jaspreets@.ggn.hcltech.com> wrote:
>Hi All,
>I am using ASP and SQL Server 2000 for an application. The problem that i am facing is that I get INVALID OBJECT NAME error. to be precise...
>"Error Type:
>Microsoft OLE DB Provider for SQL Server (0x80040E37)
>Invalid object name '<table name>'"
>the application runs for some days without any issues then suddenly it starts showing the error. When the error starts coming.. it appears in all the screens that were running without any issues just moments back. The only solution which works is to log
out of the application and login again.
>Please suggest what could be the cause of the error...
>If you need any more information just let me know...
>Regards
>Jaspreet
|||Sue,
Thanx for your suggestion... I'll definitely check the context next time
the error occurs.
In my code, I have used database.owner.object in all the asp pages. Can
you give me an idea why this error could come.. so that in future I'd
take care of this issue.
Regards
Jaspreet
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
|||It's hard to say without knowing your app but you may want
to check the default database for the user this happens
with. Also If you change database context in any of the
stored procedures, queries, etc (e.g. with USE
SomeDatabase).
-Sue
On Tue, 08 Jun 2004 21:57:04 -0700, Jaspreet Sethi
<jaspreets@.ggn.hcltech.com> wrote:
>Sue,
>Thanx for your suggestion... I'll definitely check the context next time
>the error occurs.
>In my code, I have used database.owner.object in all the asp pages. Can
>you give me an idea why this error could come.. so that in future I'd
>take care of this issue.
>Regards
>Jaspreet
>*** Sent via Devdex http://www.devdex.com ***
>Don't just participate in USENET...get rewarded for it!
INVALID OBJECT NAME Error
I am using ASP and SQL Server 2000 for an application. The problem that i am
facing is that I get INVALID OBJECT NAME error. to be precise...
"Error Type:
Microsoft OLE DB Provider for SQL Server (0x80040E37)
Invalid object name '<table name>'"
the application runs for some days without any issues then suddenly it start
s showing the error. When the error starts coming.. it appears in all the sc
reens that were running without any issues just moments back. The only solut
ion which works is to log o
ut of the application and login again.
Please suggest what could be the cause of the error...
If you need any more information just let me know...
Regards
JaspreetWhen you get the errors, check the connections to see what
database context is being used by the web clients. You can
capture this information in many ways such as with Profiler,
sp_who, sp_who2, querying sysprocesses, checking the Current
Activity node in Enterprise Manager, etc. It could be that
the database context is changing. You could also try fully
qualifying the object with database.owner.object in whatever
code you are using.
-Sue
On Sat, 5 Jun 2004 05:26:02 -0700, "Jaspreet"
<jaspreets@.ggn.hcltech.com> wrote:
>Hi All,
>I am using ASP and SQL Server 2000 for an application. The problem that i a
m facing is that I get INVALID OBJECT NAME error. to be precise...
>"Error Type:
>Microsoft OLE DB Provider for SQL Server (0x80040E37)
>Invalid object name '<table name>'"
>the application runs for some days without any issues then suddenly it starts showi
ng the error. When the error starts coming.. it appears in all the screens that were
running without any issues just moments back. The only solution which works is to l
og
out of the application and login again.
>Please suggest what could be the cause of the error...
>If you need any more information just let me know...
>Regards
>Jaspreet|||Sue,
Thanx for your suggestion... I'll definitely check the context next time
the error occurs.
In my code, I have used database.owner.object in all the asp pages. Can
you give me an idea why this error could come.. so that in future I'd
take care of this issue.
Regards
Jaspreet
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!|||It's hard to say without knowing your app but you may want
to check the default database for the user this happens
with. Also If you change database context in any of the
stored procedures, queries, etc (e.g. with USE
SomeDatabase).
-Sue
On Tue, 08 Jun 2004 21:57:04 -0700, Jaspreet Sethi
<jaspreets@.ggn.hcltech.com> wrote:
>Sue,
>Thanx for your suggestion... I'll definitely check the context next time
>the error occurs.
>In my code, I have used database.owner.object in all the asp pages. Can
>you give me an idea why this error could come.. so that in future I'd
>take care of this issue.
>Regards
>Jaspreet
>*** Sent via Devdex http://www.devdex.com ***
>Don't just participate in USENET...get rewarded for it!
Friday, February 24, 2012
INTERSECT MDX Query - Reg
Hi Everyone,
We are facing some problem in the cube particularly in INTERSECT function.
Here are the details.
Dimension Tables:
DimTime 200601
200602
DimProduct 01
02
DimUser 101
102
103
FactTables:
FactPlayer
Time Product User
200601 01 101
200601 02 101
200601 01 102
Transact SQL Query:
Select Count(*) from
(
Select userid from FactPlayer where productId = 01
INTERSECT
Select userid from FactPlayer where productId= 02
)
PlayerCount
We want the same result from MDX query. Can you please guide us how to do it by using INTERSECT.
Expecting your valuable reply.
Regards
Vijay
Hi Vijay,
You could solve this using the Intersect function, but you don't need to. Here's an example from Adventure Works showing all the Customers who bought products from two different subcategories (mountain bikes and caps):
select {[Measures].[Internet Sales Amount]} on 0,
nonempty(
nonempty(
[Customer].[Customer].[Customer].members,
([Measures].[Internet Sales Amount], [Product].[Subcategory].&[1])
)
, ([Measures].[Internet Sales Amount],[Product].[Subcategory].&[19])
)
on 1
from [Adventure Works]
What it's doing is using the nonempty function to return a list of Customers who bought products in subcategory 1, and then using another nonempty function to filter that list by those who bought products from subcategory 19. This, I think, will be more efficient than using the Intersect function although for the record here's the same query rewritten to use Intersect:
select {[Measures].[Internet Sales Amount]} on 0,
intersect(
nonempty(
[Customer].[Customer].[Customer].members,
([Measures].[Internet Sales Amount], [Product].[Subcategory].&[1])
)
,nonempty(
[Customer].[Customer].[Customer].members,
([Measures].[Internet Sales Amount],[Product].[Subcategory].&[19])
)
)
on 1
from [Adventure Works]
HTH,
Chris
|||Hi Chris,
Thank you very much. It is working perfectly.
Vijay
|||
Hi Everyone,
We are facing some problem in the cube particularly in INTERSECT function.
Here are the details.
Dimension Tables:
DimTime 200601
200602
DimProduct 01
02
03
DimUser 101
102
FactTables:
FactPlayer
Time Product User
200601 01 101
200601 02 101
200601 01 102
200601 03 101
Transact SQL Query:
Select Count(*) from
(
Select user from FactPlayer where productId = 01
INTERSECT
Select user from FactPlayer where productId= 02
INTERSECT
Select user from FactPlayer where productId= 03
)
PlayerCount
RESULT: 1 (UserId: 101)
We want the same result from MDX query. Can you please guide us how to do it by using INTERSECT.
Expecting your valuable reply.
Regards
Vijay
|||I found the solution below.
SELECT NON EMPTY{[Measures].[User ID Distinct Count]} ON COLUMNS,
INTERSECT
(
NONEMPTY
(
INTERSECT
(
NONEMPTY
(
[DIM USER].[DIM USER].CHILDREN,
([Dim Time].[TimeKey].&[200602],
[Measures].[User ID Distinct Count],
[DIM PRODUCT].[DIM PRODUCT].&[3])
),
NONEMPTY
(
[DIM USER].[DIM USER].CHILDREN,
([Dim Time].[TimeKey].&[200602],
[Measures].[User ID Distinct Count],
[DIM PRODUCT].[DIM PRODUCT].&[11])
)
)
),
NONEMPTY
(
[DIM USER].[DIM USER].CHILDREN,
([Dim Time].[TimeKey].&[200602],
[Measures].[User ID Distinct Count],
[DIM PRODUCT].[DIM PRODUCT].&[12])
)
)
ON ROWS
FROM [DSV KPI]
Please reply me if there any changes in the query.
Thank You
Vijay