Indy 8.0 Exception 10004 in SQL Server 7

Hi all!

I am getting this Exception 10004 Interrupted system call in a project I am working on.

The project is a FTP library for SQL Server 7.
I wrote a few procedures to handle the basics of FTP functions to be used in SQL Jobs / Packages.

When I test the library in a delphi project, it works fine.

Then I build the DLL and install it in SQL.
I have made a test script that connects, uploads, downloads , list the folder and disconnects.
The first run is ok. While the connection is active everything works fine. But if I disconnect
and run the script again, nothing happens.
The server does not hang, all the procedures (from my FTP library) just return FALSE.

When debugging the DLL I found that an Exception 10004 Interrupted system call is raised when a call
to CONNECT is placed, a few lines later another exception pop up:"Connection Closed Gracefully". As
this DLL should work as a FTP Client, I should trap this error in a try .. except block. What should
I do? If I try to reconnect, I will start all the exceptions again. Is there another function I
should call?

Could anyone shed a light?

TIA
Clment

PS:I read the comment in the unit, and as its not an exception 10038, I thought it wouldnt harm to
give a try 8)