It has been a while since I worked with building a program to parse a text file. Looking for some general direction here.
Scenerio is that we recieve a text file from an overnight process. That text file is currently processed using VBA in Excel. The data is parsed in the VBA and then output to Access. I know, I know... not the best solution but those are the cards I have been dealt.
Long term solution I will switch this over to a SQL database and hook in to that to query the data instead of using Access. I have to spec out a server and await approval and due to red tape it will take 6 weeks or more.
The text file contains around 1.6MM rows of data and the reading and parsing of the file takes a couple minutes. Writing the data to Access takes around 25 minutes. It loads the data from an array in the VBA in the Access database one record at a time.
A couple of thoughts, adding an index to the Access table should speed up the process, but what I would really like is a way to insert all the records at once. It has been quite some time since I have worked with VBA and Access in such a manner. I have converted the VBA to .Net with little hassle but that hasn't sped up the database issue, obviously.
Is there a way to pass the array in to a record set and insert that recordset in one fell swoop? Or something along those lines? There has to be a way to bulk insert that array instead of a single row in the array at a time.
Any ideas?
Scenerio is that we recieve a text file from an overnight process. That text file is currently processed using VBA in Excel. The data is parsed in the VBA and then output to Access. I know, I know... not the best solution but those are the cards I have been dealt.
Long term solution I will switch this over to a SQL database and hook in to that to query the data instead of using Access. I have to spec out a server and await approval and due to red tape it will take 6 weeks or more.
The text file contains around 1.6MM rows of data and the reading and parsing of the file takes a couple minutes. Writing the data to Access takes around 25 minutes. It loads the data from an array in the VBA in the Access database one record at a time.
A couple of thoughts, adding an index to the Access table should speed up the process, but what I would really like is a way to insert all the records at once. It has been quite some time since I have worked with VBA and Access in such a manner. I have converted the VBA to .Net with little hassle but that hasn't sped up the database issue, obviously.
Is there a way to pass the array in to a record set and insert that recordset in one fell swoop? Or something along those lines? There has to be a way to bulk insert that array instead of a single row in the array at a time.
Any ideas?
