Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dataenvironment views
Message
De
08/09/2004 05:48:47
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
07/09/2004 20:45:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00940149
Message ID:
00940220
Vues:
18
>Hi all,
>
>Is there a quick way to get the programmatic representation the views/cursors defined in the data environment of a form? Example: I have defined 5 views in the dataenvironment of a form. I want to copy the dataenvironment to a different form aside from doing a SaveAs new form. I already have an existing form that I need to copy to dataenvironment to.

Ramil,
Backup your files and try this :
Local lcFromForm,lcToForm
lcFromForm = 'myForm1.scx'
lcToForm   = 'myForm2.scx'

Select * From (m.lcFromForm) ;
    where ;
    (Trim(Lower(Class)) == 'dataenvironment' Or ;
    Trim(Lower(Parent)) == 'dataenvironment') ;
    into Cursor d1 ;
    nofilter
Use In (m.lcFromForm)

Use (m.lcToForm) In 0 Exclusive Alias ToSCX
Select * From ToSCX Where Recno()=1 Into Cursor c1 nofilter
Select * From ToSCX Where Recno()#1 And ;
    !(Trim(Lower(Class)) == 'dataenvironment' Or ;
    Trim(Lower(Parent)) == 'dataenvironment') ;
    into Cursor c2 ;
    nofilter
Select ToSCX
Zap
Append From Dbf('c1')
Append From Dbf('d1')
Append From Dbf('c2')
Use
Use In c1
Use In c2
Use In d1
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform