开发者

check if EndExecuteNonQuery was successful

 insComment.EndExecuteNonQuery();

Am trying to insert values into a database. What I need is to know if the code was succesfull then I display a success message.

if(insComment.EndEx开发者_StackOverflow中文版ecuteNonQuery()){
show some message

}

Is that a workable option?


if the record is successfully inserted, then it will return 1 and you can prompt message accordingly

Should be like...

if(insComment.EndExecuteNonQuery() == 1)
{
  show some message
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜