PDA

View Full Version : Efficient way of inserting rows?



afflictedd2
14th July 2008, 16:05
Hi everyone,

I need to insert data retrieved from a dataset into a mysql database. The way I have it right now loops through the data... builds an insert query, and then executes the query. Is there a more efficient way to do this, like a bulk insert.

Thanks in advance,

Ed.

wysota
14th July 2008, 20:01
It depends on the database backend itself. See QSqlQuery::execBatch(), maybe it'll be useful for you.