Someone please help! I keep geting this error when trying to use sql
Someone please help! I keep geting this error when trying to use sql in my program. I don't know what to do and it always shows up when I am using sql in my program. Why?
An attempt to attach an auto-named database for file C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\CID.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
at CCPDNS.CIDDataSetTableAdapters.CIDTableAdapter.Fill(CIDDataTable dataTable) in C:\Documents and Settings\All Users\Documents\Visual Studio 2005\Projects\CCPD Project\CCPD Project\CIDDataSet.Designer.vb:line 1544
at CCPDNS.DesktopUC.DesktopUC_VisibleChanged(Object sender, EventArgs e) in C:\Documents and Settings\All Users\Documents\Visual Studio 2005\Projects\CCPD Project\CCPD Project\DesktopUC.vb:line 16
at System.Windows.Forms.Control.OnVisibleChanged(EventArgs e)
at System.Windows.Forms.ScrollableControl.OnVisibleChanged(EventArgs e)
at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.set_Visible(Boolean value)
at System.Windows.Forms.Design.ControlDesigner.SetUnhandledException(Control owner, Exception exception)
at System.Windows.Forms.Design.ControlDesigner.DesignerWindowTarget.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.SetParent(HandleRef hWnd, HandleRef hWndParent)
at System.Windows.Forms.Control.SetParentHandle(IntPtr value)
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Design.DesignerFrame.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Design.PbrsForward.System.Windows.Forms.IWindowTarget.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.IntCreateWindowEx(Int32 dwExStyle, String lpszClassName, String lpszWindowName, Int32 style, Int32 x, Int32 y, Int32 width, Int32 height, HandleRef hWndParent, HandleRef hMenu, HandleRef hInst, Object pvParam)
at System.Windows.Forms.UnsafeNativeMethods.CreateWindowEx(Int32 dwExStyle, String lpszClassName, String lpszWindowName, Int32 style, Int32 x, Int32 y, Int32 width, Int32 height, HandleRef hWndParent, HandleRef hMenu, HandleRef hInst, Object pvParam)
at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)
at System.Windows.Forms.Control.CreateHandle()
at System.Windows.Forms.Control.get_Handle()
at System.Windows.Forms.Control.get_ShowKeyboardCues()
at System.Windows.Forms.ControlPaint.CreateTextFormatFlags(Control ctl, ContentAlignment textAlign, Boolean showEllipsis, Boolean useMnemonic)
at System.Windows.Forms.ButtonInternal.ButtonBaseAdapter.CreateTextFormatFlags()
at System.Windows.Forms.ButtonBase.CreateTextFormatFlags()
at System.Windows.Forms.ButtonInternal.ButtonBaseAdapter.CommonLayout()
at System.Windows.Forms.ButtonInternal.CheckableControlBaseAdapter.CommonLayout()
at System.Windows.Forms.ButtonInternal.RadioButtonBaseAdapter.CommonLayout()
at System.Windows.Forms.ButtonInternal.RadioButtonStandardAdapter.Layout(PaintEventArgs e)
at System.Windows.Forms.ButtonInternal.CheckableControlBaseAdapter.GetPreferredSizeCore(Size proposedSize)
at System.Windows.Forms.ButtonBase.GetPreferredSizeCore(Size proposedConstraints)
at System.Windows.Forms.RadioButton.GetPreferredSizeCore(Size proposedConstraints)
at System.Windows.Forms.Control.GetPreferredSize(Size proposedSize)
at System.Windows.Forms.ButtonBase.GetPreferredSize(Size proposedSize)
at System.Windows.Forms.Layout.DefaultLayout.LayoutAutoSizedControls(IArrangedElement container)
at System.Windows.Forms.Layout.DefaultLayout.xLayout(IArrangedElement container, Boolean measureOnly, Size& preferredSize)
at System.Windows.Forms.Layout.DefaultLayout.LayoutCore(IArrangedElement container, LayoutEventArgs args)
at System.Windows.Forms.Layout.LayoutEngine.Layout(Object container, LayoutEventArgs layoutEventArgs)
at System.Windows.Forms.Control.OnLayout(LayoutEventArgs levent)
at System.Windows.Forms.ScrollableControl.OnLayout(LayoutEventArgs levent)
at System.Windows.Forms.ContainerControl.OnLayout(LayoutEventArgs e)
at System.Windows.Forms.Control.PerformLayout(LayoutEventArgs args)
at System.Windows.Forms.Control.PerformLayout()
at System.Windows.Forms.Control.ResumeLayout(Boolean performLayout)
at System.Windows.Forms.Design.ControlCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, Object codeObject)
at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.DeserializeName(IDesignerSerializationManager manager, String name, CodeStatementCollection statements)

