|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Could not find database ID 14. Database may not be activated yet or may be in transition.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. and what are you telling you sysdatabases?
-- Show quoteCurrent location: Alicante (ES) "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. > > > 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. > > |
|||||||||||||||||||||||