Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Append Memo
Message
De
30/04/2011 04:15:51
 
 
À
29/04/2011 16:05:03
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Versions des environnements
Environment:
C# 4.0
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01508713
Message ID:
01508904
Vues:
59
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);
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform