sql - How to pass multiple command in one query? -
sql - How to pass multiple command in one query? -
hi how can write code below more simply? ... 2 sql(oledb) command in 1 query.
con.open(); cmd.commandtext = "delete * customers id_c = 1"; cmd.executenonquery(); cmd.clone(); cmd.commandtext = "delete * books id_b = 1"; cmd.executenonquery(); cmd.clone(); con.close();
provided don't need number of rows affected (returned executenonquery
) can set both commands in same sql separated ";"
con.open(); cmd.commandtext = "delete * customers id_c = 1; delete * books id_b = 1"; cmd.executenonquery(); con.close();
sql wpf
Comments
Post a Comment