开发者

Counting rows with a SqlDataAdapter

I have a problem in my co开发者_如何学Gode. I want to get the row count from my SqlDataAdapter if there are any rows.


Maybe try dt.Rows.Count since that is a table and has rows.


You were doing an assignment instead of a comparison, you have to use == :

if (dt.Rows.Count == 0 )
{
    // code here
}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜