Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MS Access adding nulls and growning exponentially...

Status
Not open for further replies.

paulepadilla

Programmer
Apr 15, 2004
14
US
I have an access 2002 database that is accessed by two vb6 applications. One application runs in the background to grab information from an outside source and writes to the Access database. The second application just views the records in the Access database. Both application runs on the same machine. The mdb file is about 1.5 megs when it is compacted. When both applications are running the database eventually gets to 2gig in three hours even if there were no new data populated to the database. Although, the data that is being appended to it are nothing but NULLS (00h). The database doesn't grow exponentially if only one of "any" of the two applications are running. But when both are running the database eventually will get to 2 gigs in three hours. Any ideas?

Thanks,
Paul
 
Its a well known fact with Access. You would probably find if you deleted all the records in it, it would stay the same size. Look up "compacting". If in Access you select Tools/Database Utilities you will see Compacting Database
 
If you do a keyword search on Compacting on this site you should find some info. Regards
 
Yes...I very aware of the compact option in Access. I had already wrote a Sub in VB to compress it before and after one of the application terminates. That still doesn't solve the problem when the database grows from 1.5m to 2Gig in 3 hours and all its doing is appending NULLS (00h). You can't write to Access after 2Gigs.
 
Are you actually trying to record a very large number of NULLs?

If you're not, then do a test for NULL before saving to the db and only save non-NULL values. You could perhaps just save the time/index/whatever of the non-NULL values.

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'If we're supposed to work in Hex, why have we only got A fingers?'
 
I don't allow NULLS in any of the fields of the table that it persistantly tries to update.
 
You're not confusing the character NULL (which is the ASCII character represented by 0) with a database Null (which means that no value is available)?

A database can store the character Chr$(0) as a string, and doesn't see it as <not available> value. It sounds as if the problem may be in your acquisition routine. Could we have more details?

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'If we're supposed to work in Hex, why have we only got A fingers?'
 
John...Yes they are <NULLS>. Please reread my first post. All the information you are asking is there....thanks.
 
OK here's what I found. The one application that just reads the database shells out the program that writes to the database. Here's the line of code that does this from that one application:

Shell App.Path & "\ImportRes.exe"

I commented this line and executed it. I also ran the second application manually and those NULL problems went away.

So my next question is. Is there another way to SPAWN an application without using the SHELL approach?

Thanks,
Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top