Exceeding 2 Gb MDB file size (and a bit of TGIF humour)

Exceeding the 2 Gb MDB file size gives you an exceedingly misleading error message:

In Jet 4.0 one message that is received when the 2 Gb file size is exceeded is invalid argument.    This is, of course, utterly confusing and can mean other things such as corruption.

In A2007/ACE (I was running in an ACCDB) I got the following message

3049 Cannot open database ''.  It may not be a database that your application recognizes, or the file may be corrupt.

running the following code.  (Watch for line wrap.)

Const FillText As String = "ASdlkjSLDJKADSLJADSLJ ASDLJK ALSDJ LASJKD
LJASLDJK ALSJKD LAJSD lJKA SDLJK ASDLj ASDLj ALSDJ LJ " & _
    "ASdlkjSLDJKADSLJADSLJ ASDLJK ALSDJ LASJKD LJASLDJK ALSJKD LAJSD
lJKA SDLJK ASDLj ASDLj ALSDJ LJ " & _
    " AS:LK:ASDK A:D :AKSD :ASDK:AKSD :AKS D adfasdf asd fasdf asdf"
Sub Filltable()

Dim rs As DAO.Recordset

Set rs = CurrentDb.OpenRecordset("Table1")

tagTop:
    rs.AddNew
    rs!field1 = FillText
    rs.Update
    DoEvents
    GoTo tagTop

End Sub

Now this code runs for several hours so be patient.  I only ran it inside Access 2007 and ACCDBs.  I'll run it in Access 2003 just to double check that message.     (Out for steak, Caesar salad and mugs of red wine with friends.)

Now note that you don't want an autonumber key on the table.  Just the text field.  I suspect by the time you hit five million records the overflow areas of the index will get real, real slow.  But I don't feel like testing that.

Humour

Bill Mosca, fellow Access MVP, had the following to say about my FillText string:  Here's a site for greeking text...in case you need to fill a longer string without monkey-typing it yourself.
http://www.duckisland.com/GreekMachine.asp

Of course another alternative is Lorem Ipsum.    I used a paragraph from that in a reply to someone who stated "Of course, we're going to have to argue that one for a while."

Published Fri, May 8 2009 17:14 by Tony
Filed under: ,

Comments

# re: Exceeding 2 Gb MDB file size (and a bit of TGIF humour)

I've only encountered one Access database "in the wild" that had exceeded 2 GB, and, while I can't recall what error messages it was giving, I think they were different from this. Basically there is no telling what Access may say is wrong, was my impression, if you let this happen The messages really made no sense...after scratching my head for a while, it occurred to me to look at the file size.

The users were importing big recordsets daily from an Oracle database, and never deleting them or archiving them. After a couple of years of this, they had 2GB of data.

Thursday, June 25, 2009 8:28 AM by Charles Coleman

# re: Exceeding 2 Gb MDB file size (and a bit of TGIF humour)

I run across them all of the time.  The error I have seen is 'Invalid Arguement' when they are built via code.

Monday, August 10, 2009 4:47 PM by Sean NIcholas

Leave a Comment

(required) 
(required) 
(optional)
(required)