Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Append Memo
Message
From
30/04/2011 04:15:51
 
 
General information
Forum:
ASP.NET
Category:
Other
Title:
Environment versions
Environment:
C# 4.0
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01508713
Message ID:
01508904
Views:
58
This message has been marked as the solution to the initial question of the thread.
>The old foxpro application would create a zip file that contained a basic text file. It would then append the zip file to the memo field of a foxpro table. I am attempting to duplicate this process using c# but the vfpoledb does not appear to like the APPEND MEMO command. I am able to insert into the table, including the memo field but I am finding now that my issue is that I'm storing the contents of the zip file to a variable incorrectly, so even though I'm getting data into the memo field I am not getting it there in the correct format. When I attempt to extract the data back out of the dbf and write it to a file so I can open it with winzip I get an error for "invalid zip file or corrupt zip file". I've tested it with just a regular text file and I don't have any problems with this so I know it has to do with how I'm attempting to first store the contents of the zip file to a variable by using File.ReadAllText.
>
>Basically I just need to get a zip file into a memo field of a vfp table using c#.

You should probably use a binary based method with the zip file. Maybe:
byte[] buffer = File.ReadAllBytes(filename);
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform