Query analyzer and changing database on the fly?



How I can change database in the Query Analyzer on the fly if I have
database name in the @db_namd -variable?

I tried:
use master
exec ('use ' + @db_name) and it didn't cause any error messages, but it
still use master...

And how I can query "current database" in the QA?



.



Relevant Pages

  • Re: Stupid Question - I think!
    ... I know that the table was not updated because I go to the Query Analyzer on ... update statement shown below does run in the Query Analyzer on the PDA ... (against the CE database) ... "Earl" wrote: ...
    (microsoft.public.sqlserver.ce)
  • Strange SQL Server CE 2.0 Problem
    ... Server CE database that is stored on a flash card inside the device. ... I can't use the SQL CE Query Analyzer -- the device ... selectCommand = new SqlCeCommand(sql, _connection, transaction); ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Database file already opened when synchronizing
    ... user had the Query Analyzer open in a background window) because the user ... usually would not be aware of that limitation. ... > SQL CE databases are limited to a single open connection at any ... >>I have noticed that if a PocketPC Query Analyzer has the database opened ...
    (microsoft.public.sqlserver.ce)
  • Re: sqlserver and access
    ... solid on exactly what SQL Server is. ... Query Analyzer is simply a tool that allows an administrator/developer to ... Your "central main database system" is actually a SQL Server. ... or would I need the help of a network administrator? ...
    (microsoft.public.sqlserver.programming)
  • Re: Project
    ... but this example (that you can run within Query Analyzer) should get you started: ... I am totally new to SQL/VB6.0> I need to create a lookup scenario for end users to search the database by name or zipcode. ... > Since the user will have no knowledge of writting SQL queries, I would like to create a data entry screen for the user to enter the zipcode or name and have the database queried by that input. ...
    (microsoft.public.sqlserver.programming)

Loading