按摩盒或错误按摩 [英] massage box or error massage

查看:94
本文介绍了按摩盒或错误按摩的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两种形式:
**一个用于搜索电影
**第二个用于添加电影

**我想要的是,如果某人添加了一部电影,例如 Fast5 ,并且该电影已经存在于数据库中,我希望显示一个错误消息框,告诉该电影已经存在,而不是程序崩溃.

**与搜索电影相同,如果数据库中不存在该电影,则按摩框会告诉您没有数据..!

i have two forms:
**one is for searching the movie
**second one is for adding movie

**what i want is if a person adds a movie say Fast5 and that movie already exists in the database i want a error massagebox show telling that the movie already exist rather then the program crash.

**same thing for the search for am movie if it does not exist in the database an massagebox telling that theres not data..!

推荐答案

问题出在哪里?继续.
检查查询是否返回数据?

So where is the problem ? go ahead.
check if your Query returns you data or not ?

if Yes show MessageBox.Show("Data already exist") 
if No show MessageBox.Show("No data found") 


这篇关于按摩盒或错误按摩的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆