Home All Groups Group Topic Archive Search About

Could not find database ID 14. Database may not be activated yet or may be in transition.

Author
23 Mar 2006 11:56 AM
ITALstudio S.p.A.
Hi,
I have dropped some databases of my application through Enterprise Manager.
Then, I have run my application that try to read a dropped database's table
and I receive
the following error: "Could not find database ID 14. Database may not be
activated yet or may be in transition." Instead, the exact error is the
following "Invalid object name ....".
If I run the same query in Query Analyzer I receive the correct error
"Invalid object name ....".
Therefore, I need to objtain the correct error.
In my applicatin I use a SqlDataAdapter setting the SelectCommandText.
I outline that if I restar the SqlServer's istance, the error that I receive
is the correct error "Invalid object name ....".
Can anyone help me?

Thanks.

Author
23 Mar 2006 12:04 PM
Enric
and what are you telling you sysdatabases?
--
Current location: Alicante (ES)


Show quote
"ITALstudio S.p.A." wrote:

> Hi,
> I have dropped some databases of my application through Enterprise Manager.
> Then, I have run my application that try to read a dropped database's table
> and I receive
> the following error: "Could not find database ID 14. Database may not be
> activated yet or may be in transition." Instead, the exact error is the
> following "Invalid object name ....".
> If I run the same query in Query Analyzer I receive the correct error
> "Invalid object name ....".
> Therefore, I need to objtain the correct error.
> In my applicatin I use a SqlDataAdapter setting the SelectCommandText.
> I outline that if I restar the SqlServer's istance, the error that I receive
> is the correct error "Invalid object name ....".
> Can anyone help me?
>
> Thanks.
>
>
>
Author
23 Mar 2006 12:05 PM
Uri Dimant
Yes, it is because you are executed your statement in QA but in the scope of
another database ,like
use master
go
select * from table
---"Invalid object name ....".

I think you need to check whether the database not exists in sysdatabases
table then  throw the error






Show quote
"ITALstudio S.p.A." <softw***@italstudio.it> wrote in message
news:OLpfGEnTGHA.2444@TK2MSFTNGP14.phx.gbl...
> Hi,
> I have dropped some databases of my application through Enterprise
> Manager.
> Then, I have run my application that try to read a dropped database's
> table
> and I receive
> the following error: "Could not find database ID 14. Database may not be
> activated yet or may be in transition." Instead, the exact error is the
> following "Invalid object name ....".
> If I run the same query in Query Analyzer I receive the correct error
> "Invalid object name ....".
> Therefore, I need to objtain the correct error.
> In my applicatin I use a SqlDataAdapter setting the SelectCommandText.
> I outline that if I restar the SqlServer's istance, the error that I
> receive
> is the correct error "Invalid object name ....".
> Can anyone help me?
>
> Thanks.
>
>

AddThis Social Bookmark Button