DMS500Tech
Technical User
I have spent a long time figuring out how to write VBA code to build a table in Access that has a column for every phone feature we use. It is about 180 columns wide.
I have spent a long time writing the VBA code to search an individual phone record in a text file and extract the feature information to the correct column. I have tested it endlessly with a small file containing most every combination of phone types and features.
Now comes the heart ache, when I tried to run it on a full blown live (text) file that is about 108Mb and contains around 180,000 records it chokes.
At first I thougth it was the laptop that the code was running on so I moved it over to my server and it still chokes at about the same place.
The code runs just fine then after a few minutes pops up a Runtime error 3001.
The thing I am looking at is the file size. It seems to keep hanging at 2,097,152KB. After the code is reset and the database is compacted it shrinks down to about 18,952KB.
Does anyone have any idea what I am doing wrong or is there someway to compact the database on the fly.
The server has some 280Gb of free disk space and has around 2 gig of memory so I don't think it is hardware, the laptop was not near that big and hung in the same place. I have tried to stream line the code as much as possible. I have tried to make most of the text fields as small as possible. I did not think about something like this happening because up until now I used a similar code in Excel to do about the same thing just move over so many columns and start again when the 65,536 row limit was reached.
I would have attached the code but it is about 50 pages long and works fine with small files but I really need it to work on this big one.
Any suggestions anyone??????????
I have spent a long time writing the VBA code to search an individual phone record in a text file and extract the feature information to the correct column. I have tested it endlessly with a small file containing most every combination of phone types and features.
Now comes the heart ache, when I tried to run it on a full blown live (text) file that is about 108Mb and contains around 180,000 records it chokes.
At first I thougth it was the laptop that the code was running on so I moved it over to my server and it still chokes at about the same place.
The code runs just fine then after a few minutes pops up a Runtime error 3001.
The thing I am looking at is the file size. It seems to keep hanging at 2,097,152KB. After the code is reset and the database is compacted it shrinks down to about 18,952KB.
Does anyone have any idea what I am doing wrong or is there someway to compact the database on the fly.
The server has some 280Gb of free disk space and has around 2 gig of memory so I don't think it is hardware, the laptop was not near that big and hung in the same place. I have tried to stream line the code as much as possible. I have tried to make most of the text fields as small as possible. I did not think about something like this happening because up until now I used a similar code in Excel to do about the same thing just move over so many columns and start again when the 65,536 row limit was reached.
I would have attached the code but it is about 50 pages long and works fine with small files but I really need it to work on this big one.
Any suggestions anyone??????????