如果我的数据库中没有数据,那么我该如何显示消息..... [英] if there is no data in my database then how can i show the message .....
本文介绍了如果我的数据库中没有数据,那么我该如何显示消息.....的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嘿!我可以找到或获取两个日期之间的数据,但是我想.....如果没有两个日期之间的数据,那么我该如何显示消息,表明您的数据库在所选日期中没有数据..... ..任何人都可以帮助我做到这一点吗?.....
hye! i can find out or fetch out data betn two dates but i wanna ....if there is no data betn two dates then how can i show the message that there is no data in ur database that in selected dates.......can any one help me to do that plz.....
推荐答案
取决于您如何检索记录.
如果您使用的是SqlCommand对象和SqlDataReader,请检查 DataReader. HasRows [ ^ ]属性.
如果没有,那么您使用的是什么?
Depends on how you are retrieving the records.
If you are using an SqlCommand object and an SqlDataReader, then check the DataReader.HasRows[^] property.
If not, what are you using?
如果Datagridview1.rowcount = 0,那么
msgBox".........."
如果结束
if Datagridview1.rowcount=0 then
msgBox ".........."
End If
这篇关于如果我的数据库中没有数据,那么我该如何显示消息.....的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文