Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copy and insert
Message
From
14/05/2006 03:19:41
Neil Mc Donald
Cencom Systems P/L
The Sun, Australia
 
 
To
14/05/2006 03:09:00
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01121734
Message ID:
01121735
Views:
16
Try m.PathToFile1 = "z:\smd\INFORMATIONTECHNOLOGYFOLDER\Programs\New Folder\"
Not m.PathToFile1 = "[z:\smd\INFORMATIONTECHNOLOGYFOLDER\Programs\New Folder\]"

Always use Alias not the number as you never know what it is going to be
i.e. USE main2
select main2

>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
Regards N Mc Donald
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform