Solved

Saving binary - Simple but Urgent!

Posted on 2007-04-09
4
209 Views
Last Modified: 2010-04-15
Hello,

I have a simple problem. I want to save a file from ms access to the desk. However, chars are being added at the beginning of the file and when I'm extracting the files it's being corrupted.

Here's my application:

http://www.geocities.com/i950i950/WindowsApplication1.zip

If I manually remove the added chars the file works just fine.

How can I fix this?

Thank you in advance.
0
Comment
Question by:i950
  • 2
  • 2
4 Comments
 
LVL 62

Expert Comment

by:Fernando Soto
ID: 18875972
Hi: i950;

I had no problem running the program and creating the file. When I ran WinZip on it, it uncompressed the file giving me two extracted files, it121_setup.exe and Readme.txt. I opened the readme file and it looks fine. What extra characters are being added on your system?

Fernando
0
 

Author Comment

by:i950
ID: 18877702
Hello,

It only works with WinRar not with WinZip. When I try it with WinZip I get:

error [c:\test.zip]: start of central directory not found; Zip file corrupt.
Possible cause: file transfer error.

The added characters differs from one editor to another. Here's what I get when I open it with NotePad:

$            Binary  Binary           Binary          ,؛  

Thanks.
0
 

Author Comment

by:i950
ID: 18877942
Here's the original file so you can see the difference:

http://rapidshare.com/files/25143130/it121.zip

Please help.
0
 
LVL 62

Accepted Solution

by:
Fernando Soto earned 500 total points
ID: 18878497
Hi i950;

I looked at the two files the one you sent as the original and the one that I get from the DB file in your project.

   Original   =  47,660 Bytes
   From DB =  47,728 Bytes

And the byte values were all different as well as the two file being of different size. I suspect that the compression algorithm  that was used to compress the files were different. But I was able to uncompress both with no problem using WinRNR, I could not try WinZip because I do not have it on my machine.

Fernando
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now