Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copy a general field from one table to another
Message
From
20/09/2006 16:50:01
 
 
To
20/09/2006 16:42:51
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01155745
Message ID:
01155747
Views:
19
I got this code from Andrus Moor a long time ago - it may work:
FUNCTION GENTOFIL( lcFieldname,lcFilename )

lcTempfile=SYS(3)						&& Assign temporary file name
COPY TO (lcTempfile) FIELDS (lcFieldname) NEXT 1                && Copy General field data to it  
liHandlein=FOPEN(lcTempfile+".FPT")				&& Open its .FPT 

*--Examine .FPT contents to determine type of embedded document

FSEEK(liHandlein, ??? )
liEndOffset= ???
liSize=FSIZE(lcTempfile+".FPT")-liEndOffset     && Determine data size
liHandleout=FCREATE(lcFilename+"."+lcExtension) && Create output file
FWRITE(liHandleout,FREAD(liHandlein,liSize))	&& Copy data to it
FCLOSE(liHandlein)						&& Close the temporary .FPT..
FCLOSE(liHandleout)						&& ...and the output file
ERASE (m.lcTempfile)
>Hi All,
>
>I have a general field that holds a graph - MSGRAPH object. I want to copy the graph to a second record in the same table, but I am willing to copy to another table, and back, but what I have tried is not working.
>
>
>I have copied the table by the windows copy program. but using the VFP command:
>
>APPEND GENERAL c_grph.olegrph
>
>
>wipes out the graph in the table that I am coping from.
>
>Any help is appreciated.
>
>TIA
>Beth
.·*´¨)
.·`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"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform