Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error Reading File
Message
De
13/08/2004 21:44:19
 
 
À
13/08/2004 21:14:46
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00933277
Message ID:
00933288
Vues:
26
<snip>Another possibility would be for your program try more than once. I have the impression - from my understanding of TCP, and observations with Web browsers - that it may sometimes not be possible to start a TCP session (start a connection) on the first try. But once a connection is established, it is very difficult to interrupt it (with intermittent errors), due to the built-in recovery mechanisms in TCP.

That is what I've been thinking after reading about this kind of problem on the Fox Wiki. Do you think this kind of code would work:
  *------------------------------------------------------  
  function CursorFill( tlUseSchema, tlNoData, tcOptions)
  *------------------------------------------------------  

    local llopened, liattempt, limaxattempts
    llopened = .f.
    liattempt = 0
    limaxattempts = 15
    
    for liattempt = 1 to m.limaxattempts
      if not m.llopened
        llopened = dodefault( m.tlUseSchema, m.tlNoData, m.tcOptions)
      endif
      if m.llopened
        exit
      endif
      wait timeout 1
    endfor
    
    return m.llopened 

My tables are being accessed with cursor adapters. The thing I can't quite remember is what happens if you do a "wait" in a com object ... I kinda recall that being "bad"

PS: Keep forgetting what tag to use to make code look like code on UT. Grr.
Carole Shaw
Fred Hutchinson Cancer Research Center

Eagles may soar, but weasels don't get sucked into jet engines.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform