Program fragments in Access 2.0 mdb files 
Author Message
 Program fragments in Access 2.0 mdb files

Hello group:

I've got a very strange occurance happening in some old Access 2.0
databases I'm using in a VB 3.0 app.

I've been viewing several .mdb files I'm using in my VB 3.0 app and at
the end of the .mdb file I see fragments of my Visual Basic source
It looks like stuff from an .frm file and sometimes is the info from the
beginning of the .frm file and other times its actual code from the
application.  The fragments don't show up when I open the .mdb files in
Access, nor do they show up in an .mdb file viewer.  I've tried two
different file viewers because I just could not believe what I was
seeing.  They do show up when I switch the file viewers to HEX or TEXT.

Now folks, I know Access 2.0 and VB 3.0 is old stuff, but I really don't
want my source code{*filter*} on to the end of an .mdb file!

Can anyone imagine what the truck is going on???

Please respond by email or group post.

Thanks so much in advance

Richard DuBose

Mon, 28 Aug 2000 03:00:00 GMT  
 Program fragments in Access 2.0 mdb files


>Now folks, I know Access 2.0 and VB 3.0 is old stuff, but I really don't
>want my source code{*filter*} on to the end of an .mdb file!

Such effects occur with any program, that extend files by writing to specific
offsets far behind the current EOF. Something like VB:
Open ... for Binary As hFile
Put hFile, 1000000, anything

In this case, the system extends the file, by allocating currently unused
sectors (or clusters) from disk. But as long as no other data is written to
that area, the original contents of the disk sectors are preserved.

In VB this should never occur (untested), either an error should be reported,
or the file should be extended by writing the appropriate amount of zero bytes.
But using API functions, it will be possible to create such effects.

If you want to avoid such problems, as far as possible, you can write a small
program, that creates a file and writes zeroes to it, until "disk full" is
reported. Then close and kill that file. Now all unused sectors are filled with
zeroes, or whatever pattern you have written to that file. Then you can create
and fill a new data base, that cannot contain fragments of your code in it. But
as soon as you make changes to your code, VB kills the old sources, and then
the contents of these files may again become visible in the database, after the
next update.

Best you use different partitions for your source files and the database, then
your source code can never become part of the database, since partitions never
share the same physical disk space.


Wed, 30 Aug 2000 03:00:00 GMT  
 [ 2 post ] 

 Relevant Pages 

1. Program fragments in Access 2.0 mdb files

2. Access 2.0, 7.0 and VB5, One program to open any MDB

3. Convert Access 2.0 MDB to Access95 MDB?

4. Help: Problem reading Access 2.0 mdb from VB3 under Win95/Access 7.0

5. Automatic conservion or importing to Access 97 from Access 2.0 MDB

6. VB5 and Access mdb file split into data and program

7. Convert Access 2.0 Dbf-file to Access 97 Dbf-file

8. Does user need Microsoft Access License to use EXE file that access .MDB file

9. convert Access 2.0 .mdb to Visual Basic .exe

10. Creating/Modifying MDB objects in Access 2.0 / Jet 2.5 Format

11. VB3.0 + Access 2.0 MDB?

12. Using Access 2.0 mdb with VB5?


Powered by phpBB® Forum Software