Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pulling a file into a .DBF
Message
From
28/10/1999 12:12:25
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00282249
Message ID:
00283141
Views:
18
>>>>>I want to pull several zip files into a dbf (1 per record)
>>>>>
>>>>>I tried to use filetostr and store it into a memo field but that didn't work.
>>>>>
>>>>
>>>>It should, but there's always the APPEND MEMO memo field FROM filename command, and its inverse, COPY MEMO memo field TO filename to extract it.
>>>>
>>>>You need to extract the memo content to a .ZIP file before unzipping it or altering it.
>>>
>>>Thanks for the help. Can you tell me how to create a Binary Memo field on the fly? If you look at the syntax of the alter or create table command there i a memo type m(4) but no binary memo? Any ideas?
>>>
>>
>>The following works just fine:
>>
>>CREATE TABLE DUMMY (MyMemo M)
>>APPEND BLANK
>>APPEND MEMO MyMemo FROM MyZip.ZIP
>>COPY MEMO MyMemo TO ANOTHER.ZIP
>>
>>You should be able to operate on ANOTHER.ZIP with no problem; it should have the same file size and content as MyZip.ZIP (I checked using FC, and it shows the two files as absolutely identical.)
>>
>>Using the same example DUMMY.DBF
>>
>>SELECT 0
>>CREATE TABLE XYZZY (Foo C(1) Bar I)
>>INSERT INTO XYZZY VALUES ('Hello',42)
>>INSERT INTO XYZZY VALUES ('Bye-Bye',-42)
>>USE
>>SELECT DUMMY
>>APPEND BLANK
>>APPEND MEMO MyMemo FROM XYZZY.DBF
>>COPY MEMO MyMemo TO PLUGH.DBF
>>SELECT 0
>>USE PLUGH
>>BROWSE
>>
>>>Thanks Again
>>>
>>>Scott Vanden Elzen
>
>Ed:
>
>You'll run into problems storing binary data in a plain memo field if you use different code pages. To create a binary memo field on the fly, use NOCPTRANS in your create table comand:
>
>CREATE TABLE DUMMY (MyMemo M NOCPTRANS)
>
>Thanks to John K. for pointing this out to me.

< smack > - I did forget, because I don't set a CODEPAGE in my config file.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform