Drop Table
Support Forum for database administrators and web based access to important newsgroups related to databasesNo. When I create a new or open an existing query in the SSMS 2005 Solution Explorer it always defaults to a DB that I first started on NOT the one I'm working on at the time. When I first got SQL Server 2005 I created a DB called TM and worked on that for some time, now, I'm working on a DB called SPM and whenever I create a new query from the solution explorer it defaults to TM even if I open up a query that was created under the SPM DB. This has almost caused me problem because I ran the query assuming it was in the SPM DB but was in the TM DB. I must now never forget the USE command or my data may be gone. "Wei Lu" wrote: > Hi Steel, > > Welcome to use MSDN Managed Newsgroup Support. > > From your description, my understanding of this issue is: you want to open > a Code Editor window using a particular database. If I misunderstood your > concern, please feel free to point it out. > > Just right-click the database you want to editor code and then click New > Query. The Code Editor window will using a particular database. > > Also you can change the database you using. On the tool bar , before the > Execute button, you can see the Database you are using. You can choose the > database you want to edit code in the dropdown list. > > Hope this will be helpful! > > Wei Lu > Microsoft Online Partner Support > > Get Secure! - www.microsoft.com/security > ==================== ==================== ============= > When responding to posts, please "Reply to Group" via your newsreader so > that others may learn and benefit from your issue. > ==================== ==================== ============= > This posting is provided "AS IS" with no warranties, and confers no rights . > >
Post Follow-up to this messageThis may be the answer we seek? http://forums.microsoft.com/MSDN/Sh...SiteID=1&mode=1 The popup of the dialog is related to your current context. If you have object explorer open and a server connected then the query will be connected to that server. If you have an existing query window connected it should connect to that server. If working disconnected then you will get the pop up. Also see; [url]http://www.experts-exchange.com/Databases/ Microsoft_SQL_Server /Q_21773295.html[/ur l] This answer will also be posted there soon. Regards, Greg
Post Follow-up to this messageStill not it for me. Looks like no matter what I do the 'Available Databases' drop down box always show the last DB in the server. No matter where I create the new query from it always comes up with the last DB in the server. I must remember to change to the correct DB even when opening up a old query. "Greg Rowland" wrote: > This may be the answer we seek? > > [url]http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=299273&SiteID=1&mode=1[/ur l] > > The popup of the dialog is related to your current context. If you have > object explorer open and a server connected then the query will be connect ed > to that server. If you have an existing query window connected it should > connect to that server. > If working disconnected then you will get the pop up. > > > > Also see; > [url]http://www.experts-exchange.com/Databases/ Microsoft_SQL_Server /Q_21773295.html[/ url] > > This answer will also be posted there soon. > > > > Regards, > > > > Greg > > >
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread