Re: Fatal error encountered during command execution
Posted by: Alexey Ersmambetov
Date: October 06, 2009 08:31AM

I have the very similar error on my code execution.
It happens in cycle:

cmd = New MySqlCommand("SELECT tblfiles.LocalFile, tblfiles.FTPFile from tblfiles;", cn)
rdr = cmd.ExecuteReader
pFTP.KeepAlive = True
Try
Do While rdr.Read
If File.Exists(rdr(0).ToString) = True Then
iCounter += 1
iUploadSize += fiUploadFile(rdr(0), "/" & rdr(1))
End If
Loop
End Try
pFTP.KeepAlive = False
rdr.Close()
cmd.Cancel()

This code reads the table that contains a local filepaths as source and filepaths on FTP-server as destination.
In cycle "Do While rdr.Read" it call function "fiUploadFile" that checks if the same file on server and if the same file is not exist on server this file is uploaded on server.
I tried to use this code with the table with 3500 rows and with no files on server. Ie 3500 files were to be upload on the server. But after every 220-300 files this error happened.
When I run it again from beginning it passes checking uploaded files and uploads also 220-300 files and then error arises again.
it's so impression that it depends on the lifetime of mysqlconnection, because when the files are only checked for existing, then each cycle is rapid, and when the files are loaded - is the delay ... But why???

Options: ReplyQuote


Subject
Written By
Posted
Re: Fatal error encountered during command execution
October 06, 2009 08:31AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.