I have to automate the process of writing data to MS Access database. I have created a program that was executing the dynamically generated Insert queries in a for loop. This was taking very long to execute because of the bulk of the data and the number of for loop executions. I then created a .sql file and wrote all the Insert queries into the file and now plan to execute all the queries of this file as if I was batch executing the sql queries. Using MS Access database is my constraint and I have to use C programming language.

So, it's like, I have a text file which has about 400,000 INSERT statements. Now I have to read this file from my C program to achieve the goal of executing these INSERT statements in order to populate the desired table. Can you please provide some sample code. May be that'll help. Thank you.