Solved

Saving binary - Simple but Urgent!

Posted on 2007-04-09
4
210 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 63

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 63

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

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

825 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