If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > MySQL connection was aborted by the software in your host machine

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-01-07, 08:28
MKPatio MKPatio is offline
Registered User
 
Join Date: Jan 2007
Posts: 3
MySQL connection was aborted by the software in your host machine

I am getting the following error when I make a connection to a remote MySQL Database and try to pump records into the remote DB

"MySql.Data.MySqlClient.MySqlException: Error during LOAD DATA LOCAL INFILE ---> MySql.Data.MySqlClient.MySqlException: Unable to write to stream ---> System.IO.IOException: Unable to write data to the transport connection. ---> System.Net.Sockets.SocketException: An established connection was aborted by the software in your host machine
at System.Net.Sockets.Socket.Send(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at System.IO.BufferedStream.FlushWrite()
at System.IO.BufferedStream.Flush()
at MySql.Data.MySqlClient.PacketWriter.WriteChunk(Byt e[] buf, Int32 offset, Int32 length)
at MySql.Data.MySqlClient.PacketWriter.Write(Byte[] buffer, Int32 offset, Int32 count)
--- End of inner exception stack trace ---
at MySql.Data.MySqlClient.PacketWriter.Write(Byte[] buffer, Int32 offset, Int32 count)
at MySql.Data.MySqlClient.NativeDriver.SendFileToServ er(String filename)
--- End of inner exception stack trace ---
at MySql.Data.MySqlClient.NativeDriver.SendFileToServ er(String filename)
at MySql.Data.MySqlClient.NativeDriver.ReadResult(Int 64& affectedRows, Int64& lastInsertId)
at MySql.Data.MySqlClient.CommandResult.ReadNextResul t(Boolean isFirst)
at MySql.Data.MySqlClient.CommandResult..ctor(Driver d, Boolean isBinary)
at MySql.Data.MySqlClient.NativeDriver.SendQuery(Byte[] bytes, Int32 length, Boolean consume)
at MySql.Data.MySqlClient.MySqlCommand.GetNextResultS et(MySqlDataReader reader)
at MySql.Data.MySqlClient.MySqlCommand.Consume()
at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuer y()
at TestProj.Form1.UpdateAmericaListCustomers() in C:\Program Files\Projects\Patio.AdvertisingSynch\Test\Test\Te stProj\Form1.vb:line 157" String

This is the code I am running:

Dim mcon As MySqlConnection = New MySqlConnection(ConfigurationSettings.AppSettings( "Foo"))
Dim mcmd As MySqlCommand = New MySqlCommand
mcmd.Connection = mcon

''Truncate SuppressionList Table
mcmd.CommandText = "Truncate table SuppressionList"
mcmd.CommandType = CommandType.Text
mcmd.CommandTimeout = 0
mcon.Open()

mcmd.ExecuteNonQuery()

mcmd.CommandText = "LOAD DATA LOCAL INFILE 'C:\\FooList\\CustomerList.txt' INTO TABLE SuppressionList FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n' (Name, Address1, Address2, City, State, Zip,Zip4,PhoneNumber)"
mcmd.CommandType = CommandType.Text

Try
mcmd.ExecuteNonQuery()
Catch ex As Exception
ex.ToString()
End Try

I am at a loss. Plese help. Is there a solution?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On