I have a VB6 program in which my save routine is very slow... At runtime the data is stored in a class/collection structure and shown using a treeview.
The save routine runs throught the class/collection structure, executing an sql statment for each part of the data which corresponds to a record in my database.
The looping through the structure is fine, the speed problem seems to be down to the fact that the more complex documents my program deals require about 25000 records to be written to the database, currently I am writing each record using a seperate connection.Execute "some SQL" statement and so the save can take upto a few minutes, with the sql statements commented out it takes literally seconds.
Would it be quicker to join all the sql with semi-colons and do one execute at the end? and if so is there a limit to the length of the string executed or the number of queries?




Reply With Quote