|
-
Feb 2nd, 2005, 02:17 PM
#1
Thread Starter
Fanatic Member
TimeOut
I got this error Running my APP.
12002 ERROR_INTERNET_TIMEOUT
The request has timed out.
The App does the following:
Read a picture
Connect to a remote server
Copy the picture there
But if for any reason i can not connect to the server i got the error above.
Does anyone know how do i can control this error or the time the APP try to re-connect (almost 5 minutes)
-
Feb 2nd, 2005, 02:50 PM
#2
Re: TimeOut
Why don't you show some code. It's hard to tell whats happening without it.
-
Feb 2nd, 2005, 03:22 PM
#3
Thread Starter
Fanatic Member
Re: TimeOut
Public Function SubirArchivo(ByVal IndiceImagen As Long) As Boolean
Dim ImagenTemp As DatosImagen
Dim arFolders() As String
Dim iFolder As Long
'este es
On Error GoTo ErrSubir_Archivo
ImagenTemp = arImagenesPublicar(IndiceImagen)
SubirArchivo = False
verftp = False
If oFTP.bSetCurrentDir(mBaseFTP) Then
arFolders = Split(ImagenTemp.RutaDestino, "\")
For iFolder = LBound(arFolders) To UBound(arFolders)
If Not oFTP.bSetCurrentDir(arFolders(iFolder)) Then
oFTP.bMakeDir (arFolders(iFolder))
oFTP.bSetCurrentDir (arFolders(iFolder))
End If
Next
'Cuando estoy en el ultimo folder de la estructura, poner el archivo
If oFTP.bPutFile(ImagenTemp.RutaLocal, ImagenTemp.NombreArchivo) = True Then
SubirArchivo = True
verftp = True
Else
SubirArchivo = False
verftp = False
End If
Else
'Could not get base folder
SubirArchivo = False
verftp = False
End If
Exit Function
ErrSubir_Archivo:
Debug.Print Err.Description
ManejarError Err.Number, Err.Description, "SubirArchivo"
SubirArchivo = False
Err.Clear
End Function
-
Feb 2nd, 2005, 03:36 PM
#4
Re: TimeOut
oops. I only speak English. That looks like it chooses the right directory, not uploads a file.
-
Feb 2nd, 2005, 03:55 PM
#5
Thread Starter
Fanatic Member
Re: TimeOut
Sorry.
Public Function SubirArchivo(ByVal IndiceImagen As Long) As Boolean
Rem i am using a control called : nyblack
Rem the problem is when nyblack try to connect and get a false respond
rem but, before get the false answers you lost 5 minutes.
rem oFTP is a class to open the ftp
Dim ImagenTemp As DatosImagen
Dim arFolders() As String
Dim iFolder As Long
On Error GoTo ErrSubir_Archivo
ImagenTemp = arImagenesPublicar(IndiceImagen)
SubirArchivo = False 'Var to know if i can upload the file
verftp = False
If oFTP.bSetCurrentDir(mBaseFTP) Then
arFolders = Split(ImagenTemp.RutaDestino, "\")
For iFolder = LBound(arFolders) To UBound(arFolders)
If Not oFTP.bSetCurrentDir(arFolders(iFolder)) Then
oFTP.bMakeDir (arFolders(iFolder))
oFTP.bSetCurrentDir (arFolders(iFolder))
End If
Next
'If i am in the last folder of my struct., copy the file
If oFTP.bPutFile(ImagenTemp.RutaLocal, ImagenTemp.NombreArchivo) = True Then
SubirArchivo = True 'Var to know if i can upload the file
verftp = True 'var to know if the ftp is ok
Else
SubirArchivo = False
verftp = False
End If
Else
'Could not get base folder
SubirArchivo = False
verftp = False
End If
Exit Function
ErrSubir_Archivo:
'forget this routine is my error control
Debug.Print Err.Description
ManejarError Err.Number, Err.Description, "SubirArchivo"
SubirArchivo = False
Err.Clear
End Function
-
Feb 2nd, 2005, 04:04 PM
#6
Re: TimeOut
I don't see where you are connecting. Maybe you want to take a look at this page for an example to see if you are missing something.
http://builder.com.com/5100-6373-104...ml#Listing%20A
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|