Save multiple records
-
Hi all , In my web site , at one place i have to store multiple records .. in 2 tables at a time so i am using transaction for it. so ...my code is like begin transaction ExecuteNonQuery - for first table ExecuteNonQuery - for second table commit or rollback i run this in loop for multiple records ... can any one give me better option i want to acheive 2 goals 1. save multiple records at a one time .. no loop 2. use transaction
pallavi
-
Hi all , In my web site , at one place i have to store multiple records .. in 2 tables at a time so i am using transaction for it. so ...my code is like begin transaction ExecuteNonQuery - for first table ExecuteNonQuery - for second table commit or rollback i run this in loop for multiple records ... can any one give me better option i want to acheive 2 goals 1. save multiple records at a one time .. no loop 2. use transaction
pallavi
Write a proc that does the insert for multiple records. XML is the best way to pass multiple records, OpenXML can turn that into a table, which you then insert into your main DB.
Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )