Awhile back there was some discussion about ways of sending multiple
rows of data to SQL Server. The ADO .UpdateBatch method was one of
the possibilities mentioned, and Erland said he thought that probably
once the data get to SQL Server they are probably actually inserted
one row at a time. I just want to say that based on an experience I
had a couple of days ago I am now sure that is the case. I was using
..UpdateBatch for something quick and dirty I had to do just once and
was too lazy to use XML for. An error was generated during the
..UpdateBatch process because of invalid data in one row. However, a
large number of the rows in the batch WERE written to the database.
Until now I haven't used .UpdateBatch in a production environment only
because this implies granting INSERT or UPDATE privileges to the user.
But based on this experience I would NEVER use .UpdateBatch in a
production environment, even for a user like a batch job where the
permissions would not be an issue.
FWIW.
rows of data to SQL Server. The ADO .UpdateBatch method was one of
the possibilities mentioned, and Erland said he thought that probably
once the data get to SQL Server they are probably actually inserted
one row at a time. I just want to say that based on an experience I
had a couple of days ago I am now sure that is the case. I was using
..UpdateBatch for something quick and dirty I had to do just once and
was too lazy to use XML for. An error was generated during the
..UpdateBatch process because of invalid data in one row. However, a
large number of the rows in the batch WERE written to the database.
Until now I haven't used .UpdateBatch in a production environment only
because this implies granting INSERT or UPDATE privileges to the user.
But based on this experience I would NEVER use .UpdateBatch in a
production environment, even for a user like a batch job where the
permissions would not be an issue.
FWIW.
Comment