13 messages in com.mysql.lists.dotnetError on Update - Connection already ...| From | Sent On | Attachments |
|---|---|---|
| Frank | 10 Mar 2005 10:04 | |
| SGr...@unimin.com | 10 Mar 2005 10:24 | |
| Frank | 10 Mar 2005 15:31 | |
| Frank | 14 Mar 2005 13:37 | |
| Mike Hillyer | 14 Mar 2005 13:43 | |
| brandon | 14 Mar 2005 14:54 | |
| Frank | 14 Mar 2005 15:12 | |
| brandon | 14 Mar 2005 16:03 | |
| Frank | 14 Mar 2005 16:20 | |
| stre...@tiscali.it | 14 Mar 2005 23:53 | |
| Reggie Burnett | 15 Mar 2005 07:36 | |
| Frank | 15 Mar 2005 13:01 | |
| Frank | 16 Mar 2005 14:16 |
| Subject: | Error on Update - Connection already Open()![]() |
|---|---|
| From: | Frank (stre...@tiscali.it) |
| Date: | 03/10/2005 10:04:08 AM |
| List: | com.mysql.lists.dotnet |
I'm trying to execute this code:
private void btnF9_Click(object sender, System.EventArgs e) { try { //ConnBolle.Close(); ConnBolle.Open(); DSBolle.Tables[0].Rows[this.BindingContext[DSBolle].Position].EndEdit(); DABolle.Update(DSBolle.Tables[0]); ConnBolle.Close(); } catch (DBConcurrencyException exc) { MessageBox.Show(exc.Message); ConnBolle.Close(); } }
The record on database is correctly updated, but I get the following error:
MySql.Data.MySqlClient.MySqlException: error connecting: The connection is
already Open (state=Open).
at System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows,
DataTableMapping tableMapping)
at System.Data.Common.DbDataAdapter.Update(DataTable dataTable)
at XXX line 2184
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button,
Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr
wparam, IntPtr lparam)
This happens using connector 1.0.4 and 1.0.3. I checked connections and all Open
are correctly followed by Close (and this is proved by the fact that the record
gets updated correctly and also by the fact that the error happens even if I
uncomment the ConnBolle.Close() row), it looks something wrong happens inside
the Update method...
This happens in another file too...
Many thanks for any input,
Frank




