验证Windows表单... [英] Validation of a windows form...
本文介绍了验证Windows表单...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
请帮帮我..
我是Windows窗体应用程序的初学者..
我有一个表单,我想验证所有字段,以便不要的数据不会插入到数据库中.
我尝试了很多但没有成功..
我正在使用错误提供程序...但是即使在给定错误之后,数据也会插入到数据库中...
请帮我..
我的表单中有5个字段.
单击提交按钮时,所有内容均应经过验证..
请帮帮我
Please help me out..
i am a beginner to windows form application..
i have a form and i want to validate all fields so that unwanted data will not inserted to the database..
i have tried a lot but unsuccessful..
i am using error provider...but even after given error the data is getting inserted in DB...
Pls help me out..
I have 5 fields in my form.
All should be validated at the submit button click..
please help me out
推荐答案
您尚未提供发生错误的代码,因此很难查明确切的问题.
作为初学者,我将首先阅读MSDN文档/文章以了解概念.
http://msdn.microsoft.com/en-us/library/ms229603.aspx [ ^ ]
http://msdn.microsoft.com/en-us/library/44sk2xyx (v = vs.80).aspx [
You haven''t provided the code where it is going wrong, so it is difficult to pin-point the exact problem.
As you are beginner, I would first read MSDN documentation/artciles to understand concept.
http://msdn.microsoft.com/en-us/library/ms229603.aspx[^]
http://msdn.microsoft.com/en-us/library/44sk2xyx(v=vs.80).aspx[^]
And, btw Visual Studio has awesome debugger. Put a breakpoint when you make a call to database. If it hits even if data in invalid, look at call stack and see what conditions were satisfied that it reached there.
这篇关于验证Windows表单...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文