vb中refresh方法执行之后,对Recordset.RecordCount属性会产生什么影响
恳请高手指点SqlString="Select*FromCompanywhere公司名称='"+txtName.Text+"'"Adodc3.ConnectionStri...
恳请高手指点
SqlString = "Select * From Company where 公司名称='" + txtName.Text + "'"
Adodc3.ConnectionString = ADODCstr
Adodc3.RecordSource = SqlString
Adodc3.Refresh
If isAdd Then
If Adodc3.Recordset.RecordCount > 0 Then
MsgBox "该公司名已存在!"
SaveInformation = False
Exit Function
为什么通过判断Adodc3.Recordset.RecordCount 是否大于零就能知道有重名的呢? 展开
SqlString = "Select * From Company where 公司名称='" + txtName.Text + "'"
Adodc3.ConnectionString = ADODCstr
Adodc3.RecordSource = SqlString
Adodc3.Refresh
If isAdd Then
If Adodc3.Recordset.RecordCount > 0 Then
MsgBox "该公司名已存在!"
SaveInformation = False
Exit Function
为什么通过判断Adodc3.Recordset.RecordCount 是否大于零就能知道有重名的呢? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询