ExecuteNonQuery doesn't return results

后端 未结 9 1869
迷失自我
迷失自我 2020-11-28 10:46

This is my (rough) code (DAL):

int i;
// Some other declarations

SqlCommand myCmdObject = new SqlCommand(\"some query\");

conn.open();
i = myCmdObject.Exec         


        
9条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-28 11:11

    Could you post the exact query? The ExecuteNonQuery method returns the @@ROWCOUNT Sql Server variable what ever it is after the last query has executed is what the ExecuteNonQuery method returns.

提交回复
热议问题