Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Beforeopentables and returning .f.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00944089
Message ID:
00944623
Vues:
10
Thanks so much Cathy. It works fine. I searched but I couldn't find any information on what objects to step through to determine the cursors in the DE but you knew it right off the bat! Thanks again!

Tracy

>>Perfect Cathy. Thanks! I had tried a form property but I didn't have the sequence correct to set it and check for it. Now it is working great. However, just curious, but is there a way to check for the existence of a table without knowing its actual filename?
>
>Yes there is a way to do it generically. Put this code in the OpenTables method of the dataenvironment:
>
>
>NODEFAULT
>
>llOkay = .t.
>FOR ln = 1 TO This.Objects.Count
>  IF This.Objects[ln].Baseclass <> 'Cursor'
>    LOOP
>  ENDIF
>  IF FILE(This.Objects[ln].Cursorsource)
>    WAIT WINDOW This.Objects[ln].Cursorsource + ' exists'
>  ELSE
>    WAIT WINDOW This.Objects[ln].Cursorsource + ' does not exist'
>    llOkay = .f.
>    EXIT
>  ENDIF
>ENDFOR
>
>IF llOkay
>  DODEFAULT()
>ELSE
>  ThisForm.lAbort = .t.
>ENDIF
>
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform