B
Benny Chow
Hello all,
I have a sql string that including both insert and select, for example:
sql = " INSERT INTO table1 (id, name) VALUES ('100', 'hello world') ";
sql += " SELECT MAX(id) FROM table1 ";
I want to execute these two sql statement in one execution, so i decided
to use executeReader. However, a friend told me that he read an article
says that it's not a good idea to exeute non-query (insert) with the
executeReader, but can't remember what are the disadvantages.
Is there anyone in here can give me a hand telling me why?
Thanks,
Benny
I have a sql string that including both insert and select, for example:
sql = " INSERT INTO table1 (id, name) VALUES ('100', 'hello world') ";
sql += " SELECT MAX(id) FROM table1 ";
I want to execute these two sql statement in one execution, so i decided
to use executeReader. However, a friend told me that he read an article
says that it's not a good idea to exeute non-query (insert) with the
executeReader, but can't remember what are the disadvantages.
Is there anyone in here can give me a hand telling me why?
Thanks,
Benny