Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copy and insert
Message
De
14/05/2006 03:09:00
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Copy and insert
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01121734
Message ID:
01121734
Vues:
60
hi all,

i need help to fix this code below, to make copy and insert form the same table before delete the table..
&&&&via event click

m.PathToFile1 = "[z:\smd\INFORMATIONTECHNOLOGYFOLDER\Programs\New Folder\]"
lcSearchFile1 = m.PathToFile1+"main2" 
IF FILE(m.lcSearchFile1+".dbf")
         ***try 1*******
*SELECT 2           & not work
*USE main2          ¬ work
*GO TOP IN main2    ¬ work
*IF NOT EOF("main2")¬ work
**************try 2********************
*USE (m.lcSearchFile1+".dbf")           ¬ work
*GO TOP IN (m.lcSearchFile1+".dbf")     ¬ work 
*IF NOT EOF("(m.lcSearchFile1+".dbf")") ¬ work 
****************try 3***********************************
*USE FILE(m.lcSearchFile1+".dbf")           ¬ work
*GO TOP IN FILE(m.lcSearchFile1+".dbf")     ¬ work 
*IF NOT EOF ("(m.lcSearchFile1+".dbf")")    ¬ work 
************************************************************
    gcDelimName = ALIAS( ) + '.xls'
    gcPath = [w:\Quality Test 01\mtest\]
    gcDelimName =  gcPath +   DTOS(file_date) +  ".XLS"
   
    lcFile=gcDelimName

    if adir(dummy,lcFile)>0
        MESSAGEBOX(" file exists")
    else
        COPY  TO (gcDelimName) XL5
    ENDIF
 endif
********************************************
insert INTO mstr ;   && not work
                 SELECT * FROM FILE(main2) WHERE file_date NOT IN (SELECT file_date FROM mstr)
*******************************************************
   DELETE FILE(m.lcSearchFile1+".dbf")
   DELETE FILE(m.lcSearchFile1+".cdx")
   DELETE FILE(m.lcSearchFile1+".fpt")

ENDIF 
thanks
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform