NewBie Vb.net 2010 Express [英] NewBie Vb.net 2010 Express

查看:73
本文介绍了NewBie Vb.net 2010 Express的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何制作可以搜索编辑删除和添加的示例数据库。



并且可以在dataviewGrid中查看数据.mdb文件..



任何人都可以将此vb6转换为vb.net 2010代码



< --------- --------------------------------------->

< pre lang =vb> 如果 txtsearch.Text = 然后
MsgBox 输入文本框!,vbInformation, 无数据
txtsearch。 Text =
msgError.Caption =
否则
Data1.Refresh
Data1.RecordSource = select * from Customer_data,其中Email_Suffix =' + txtsearch.Text + '
Data1.Refresh
如果 Data1.Recordset.RecordCount = 0 然后


Data1.Refresh

MsgBox No Match!,vbExclamation, 未找到
msgError.Caption =


其他


如果 txtsearch.Text<> 然后

msgError.Caption = Data1.Recordset.Fields( Ship_to_Identifier
MsgBox 匹配找到!!!,vbInformation, 找到的数据
dbkey.Enabled = True

' 文本框
' txtkey.Enabled = True
' cmdKeyIdentify .Enabled = True

Data1.Refresh
ElseIf Data1.Recordset.RecordCount = 0 然后
MsgBox 数据不足!,vbExclamation, 错误

其他
msgError.Caption = Data1.Recordset.Fields( Ship_to_Identifier

结束 如果
结束 如果
结束 如果

解决方案

从头开始学习东西的最佳方法是阅读有关它的书或联系Mr.Google.com。公平地说,我感谢您在问题中表现出的努力。但我们在问答部分回答特定的编码问题,包括你提交的截图和代码片段。



欢呼,

Marco Bertschi

How to make a sample database that can search edit delete and add.

and can be View the data .mdb file in dataviewGrid..

Can anyone Convert this vb6 to vb.net 2010 code

<------------------------------------------------>

If txtsearch.Text = "" Then
MsgBox "Input textbox!", vbInformation, "No Data"
txtsearch.Text = ""
msgError.Caption = ""
Else
    Data1.Refresh
    Data1.RecordSource = "select * from Customer_data where Email_Suffix = '" + txtsearch.Text + "' "
    Data1.Refresh
If Data1.Recordset.RecordCount = 0 Then

 
    Data1.Refresh

MsgBox "No Match!", vbExclamation, "Not found"
msgError.Caption = ""


Else


If txtsearch.Text <> "" Then

msgError.Caption = Data1.Recordset.Fields("Ship_to_Identifier")
MsgBox "Match Found!!!", vbInformation, "Data found"
dbkey.Enabled = True

'Text Box
'txtkey.Enabled = True
'cmdKeyIdentify.Enabled = True

Data1.Refresh
ElseIf Data1.Recordset.RecordCount = 0 Then
MsgBox "Data is lack!", vbExclamation, "Error"
 
Else
msgError.Caption = Data1.Recordset.Fields("Ship_to_Identifier")
 
End If
End If
End If

解决方案

Best way to learn something from scratch is always to read a book about it or contact Mr. "Google.com". To be fair, I appreciate your effort you showed within your question. But we are here in the Q&A section to answer to specific codeing problems including screenshots and code snippets submitted by you.

cheers,
Marco Bertschi


这篇关于NewBie Vb.net 2010 Express的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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