Connect to one database then connect to another database. After working with one database for some time and then trying to switch back to other database using the Connection Manager | [right click] connection | 'Set as Current', the following error occurs:
**********************************************************************
Exception Information
**********************************************************************
Exception: System.InvalidOperationException
Message : Invalid attempt to read when no data is present.
Stack Trace:
at System.Data.SqlClient.SqlDataReader.GetValue(Int32 i)
at System.Data.SqlClient.SqlDataReader.get_Item(Int32 i)
at Quest.Toad.Db.ProxyDataReader.get_Item(Int32 i)
at Quest.Toad.SqlServer.SqlServerConnection.DatabaseVersion()
at Quest.Toad.SqlServer.SqlServerConnection.get_CanChangePassword()
at Quest.Toad.ConnectionManager.ConnectionControl.CanChangePassword(BarButtonItem bbiChangePassword)
at Quest.Toad.ConnectionManager.ConnectionControl.UpdateActions()
at Quest.Toad.ConnectionManager.ConnectionControl.connectionList_SelectionChanged(Object sender, EventArgs e)
at DevExpress.XtraTreeList.TreeList.RaiseSelectionChanged()
at DevExpress.XtraTreeList.Handler.TreeListHandler.NormalState.SelectionChanged()
at DevExpress.XtraTreeList.Handler.TreeListHandler.OnSelectionChanged()
at DevExpress.XtraTreeList.TreeList.OnSelectionChanged()
at DevExpress.XtraTreeList.TreeListMultiSelection.OnInsertComplete(Int32 index, Object value)
at System.Collections.CollectionBase.System.Collections.IList.Add(Object value)
at DevExpress.XtraTreeList.TreeListMultiSelection.Add(TreeListNode node)
at Quest.Toad.TreeList.ToadTreeList.OnMouseDown(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int3
Original connection has been lost (disconnected externally)
Use alternative method to switch connections i.e.
Use the connection dropdown on the toolbar to switch connections. (See attached screenshot). If you don't see the dropdown, [right click] on the Menu bar and check 'Connections'
The above solution only allows you to reconnect without an error. The lost connection is occurring outside of Toad.
© ALL RIGHTS RESERVED. Feedback Terms of Use Privacy Cookie Preference Center