I have a program in which I need to run multiple insert statements (dynamically generated) against a MS SQL Table. Right now, I do (pseudo-code):
Loop
Generate Insert Statement String
SQLCommand.Text = Generated Insert Statement String
SQLCommand.Execute().
End Loop
Close Connection
Is it better performance-wise to simply construct one big string of inserts, separated by semi-colons. And run only one SQLCommand.Execute() statement? Or does it not make a difference?
Thanks!