This message will get when the data base is set to offline.if we set the this property to particular database ,we can not do any transaction queries on it.
so the solution for this one is to restart the SQL server or to wait till then up to the transition process completed.The transition process time takes process.,so if you want to do any queries on it immediately ,SQL server restart is better solution as my point of view.
SQL server 2005==>goto SQL server configuration surface area==>restart the server
SQL server2008 ==>go to configuration tools==>select SQL server==>restart