首页
论坛
新职位
福彩12选5走势图论坛
什么's new
新职位
新的个人资料帖子
最新活动
会员
目前的访客
新的个人资料帖子
福彩12选5走势图个人资料帖子
VB.NET社区
登录
登记
什么's new
福彩12选5走势图
福彩12选5走势图
仅福彩12选5走势图标题
经过:
新职位
福彩12选5走势图论坛
Menu
Log in
Register
安装应用
安装
首页
论坛
数据库
OLEDB
如何检查一条记录中的多个值
您正在使用过期的浏览器。它可能无法正确显示此网站或其他网站。
您应该升级或使用
替代浏览器
.
回复主题
信息
<blockquote data-quote="PDS8475" data-source="post: 14508" data-attributes="member: 11775"><p>HI</p><p>I am trying to check if a specific record exists in the database.</p><p>I am Using the following code</p><p>[CODE=csharp]OleDbCommand check_All = new OleDbCommand("SELECT COUNT(*) FROM Donations WHERE EquipmentType = @TestType AND EquipmentMake = @TestMake AND EquipmentModel = @TestModel AND EquipmentSerial = @TestSerial", Testconnection);</p><p> check_All.Parameters.AddWithValue("@TestType", Type_comboBox.Text);</p><p> check_All.Parameters.AddWithValue("@TestMake", Make_textBox.Text);</p><p> check_All.Parameters.AddWithValue("@TestModel", Model_textBox.Text);</p><p> check_All.Parameters.AddWithValue("@TestSerial", Serial_textBox.Text);</p><p> //Testconnection.Open();</p><p> int AllExist = (int)check_Serial.ExecuteScalar();</p><p> if (AllExist > 0)</p><p> {</p><p> MessageBox.Show("All exists");</p><p> }</p><p> else</p><p> {</p><p> MessageBox.Show("All does not exist");</p><p> }[/CODE]</p><p></p><p>The problem is that it checks that the values are anywhere in the database but not if they are in the same record. How would I go about checking that they are all in the same record?</p></blockquote><p></p>
Insert quotes…
确认
发表回复
首页
论坛
数据库
OLEDB
如何检查一条记录中的多个值
本网站使用Cookie来帮助个性化内容,调整您的体验并在注册时保持登录状态。
继续使用本网站,即表示您同意我们使用cookie。
接受
了解更多…
最佳
底部