Results 1 to 6 of 6

Thread: TimeOut

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Sep 1999
    Location
    Santo Domingo,D.N., Dom. Rep.
    Posts
    707

    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)

  2. #2
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: TimeOut

    Why don't you show some code. It's hard to tell whats happening without it.

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Sep 1999
    Location
    Santo Domingo,D.N., Dom. Rep.
    Posts
    707

    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

  4. #4
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: TimeOut

    oops. I only speak English. That looks like it chooses the right directory, not uploads a file.

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Sep 1999
    Location
    Santo Domingo,D.N., Dom. Rep.
    Posts
    707

    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

  6. #6
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    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
  •  



Click Here to Expand Forum to Full Width