Hi
Im trying to INSERT 152 rows in a table. To speed it up im trying to build a String with all the rows and then execute them all at once. Im using ADODB.Command but it looks like I can only insert one row at a time. Does anyone have an idea how to do this?
This is my code(Automation error):
szSQLString = ""
i = 0
Do While Not oRs2.EOF
szSQLString = szSQLString + "INSERT INTO...."
i = i + 1
If i = 152 Then
objCommand.CommandText = szSQLString
objCommand.Execute RecordsAffected:=lRecordsAffected, Options:=adCmdText Or adExecuteNoRecords
i = 0
szSQLString = ""
End If
oRs2.MoveNext
Loop
Best regards
/Bjso
