Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copy a general field from one table to another
Message
From
21/09/2006 08:12:37
 
 
To
20/09/2006 16:50:01
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01155745
Message ID:
01155904
Views:
18
Thanks, but not really what I am looking for. I just want to have a table, that now only has one record and one general field. I want to add a second record to that table and have the contents of the first record's general field copied to the second record. This just seams to create a file of the contents of the general field.

Beth

>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
Previous
Reply
Map
View

Click here to load this message in the networking platform