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:
00944535
Vues:
12
This message has been marked as a message which has helped to the initial question of the thread.
>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
Cathy Pountney, Microsoft Visual FoxPro MVP
Memorial Business Systems, Inc. (www.mbs-intl.com)

My Website: (www.frontier2000.com)
My Blog: (www.cathypountney.blogspot.com)
My Book: The Visual FoxPro Report Writer - Pushing it to the Limit and Beyond
Free MSDN Article: What's New in the VFP 9.0 Report Writer
Free MSDN Article: The VFP 9.0 Report Writer In Action
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform