8 messages in com.mysql.lists.dotnetRE: Out of net| From | Sent On | Attachments |
|---|---|---|
| Jorge Bastos | 03 Mar 2006 09:05 | |
| Jorge Bastos | 03 Mar 2006 09:09 | |
| Darren Hill | 03 Mar 2006 09:12 | |
| Jorge Bastos | 03 Mar 2006 09:23 | |
| SGr...@unimin.com | 03 Mar 2006 10:22 | |
| Darren Hill | 03 Mar 2006 13:02 | |
| Joshua Kugler | 03 Mar 2006 13:36 | |
| Blue Wave Software | 05 Mar 2006 01:46 |
| Subject: | RE: Out of net![]() |
|---|---|
| From: | Darren Hill (dhi...@ormac.com) |
| Date: | 03/03/2006 09:12:10 AM |
| List: | com.mysql.lists.dotnet |
My first suggest would be take the time to create a SQL statement, rather then do this through code ... ie. UPDATE tablename <BASE ON SELECT> yadda yadda.
You're asking a lot of a connector to open/close/whatever in a 5000+ loop. The server must hate that and is kicking it out.
________________________________________ Darren Hill - dhi...@ormac.com Ormac Digital Content Management and IT Solutions www.ormacdigital.com
(416) 410-1154 Ormac Digital is proud to partner with: Allstream - www.allstream.com Route1 - www.route1.com
________________________________________
-----Original Message----- From: Jorge Bastos [mailto:mysq...@decimal.pt] Sent: March 3, 2006 12:06 PM To: dot...@lists.mysql.com Subject: Out of net
DecimalPeople,
I'm doing a loop with 5000 records, and inside this loop i'm updating another table depending on a value on the first table, as i will show below:
dim dt as new datatable dt=sqldatatable("select * from table_name")
for i as int32=0 to dt.rows.count-1 sql="update other_table set fields='" & dt.rows(i)("value") & "' insert_sql(sql) next
In about the 2500 record +- i just get out of network and got the error below:
************** Exception Text ************** System.Net.Sockets.SocketException: A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied at System.Net.Sockets.Socket.Shutdown(SocketShutdown how) at MySql.Data.Common.SocketStream.Read(Byte[] buffer, Int32 offset, Int32 count) at System.IO.BufferedStream.ReadByte() at MySql.Data.MySqlClient.PacketReader.ReadHeader() at MySql.Data.MySqlClient.PacketReader.OpenPacket() at MySql.Data.MySqlClient.NativeDriver.Open() at MySql.Data.MySqlClient.MySqlConnection.Open()
I'm now saying that is the driver problem. After this, i've noticed that i only can't connect to the mysql server, i just can't connect to no remote machine, completly without network, not even a ping works. I just wait about 1 minute and it starts to work again.
My Question is, why does this happens? if there any option for the connection string to solve this, doing some fine tunning?
Another question, isn't going to be out no more versions of the driver?
Thanks in advanced, Jorge Bastos




