vb电脑已经没有了,很简单的程序。自己研究一下做做.
步骤:
1.连接数据库
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db_ExpStu.mdb;Persist Security Info=False"
’连接字符串
Adodc1.RecordSource = "select * from tb_stu " ‘查询所有数据
Adodc1.Refresh
Set DataGrid1.DataSource = Adodc1 ‘在DATAGRID1中显示出来
2.查询
查询主要代码
Private Sub Cmd_Find_Click()
If Text1.Text = "" Then
MsgBox "请输入要查询的学生编号", , "信息提示"
Text1.Text = ""
Text1.SetFocus
Exit Sub
Else
MyInt = Val(Trim(Text1.Text)) '给变量赋值
Adodc1.RecordSource = "select * from tb_stu where 年龄= " + Str(MyInt) + ""
Adodc1.Refresh
Set DataGrid1.DataSource = Adodc1
End If
End Sub
本文地址: http://www.goggeous.com/20241214/1/616821
文章来源:天狐定制
版权声明:除非特别标注,否则均为本站原创文章,转载时请以链接形式注明文章出处。
2025-01-08职业培训
2025-01-08职业培训
2025-01-08职业培训
2025-01-08职业培训
2025-01-08职业培训
2025-01-08职业培训
2025-01-08职业培训
2025-01-08职业培训
2025-01-08职业培训
2025-01-08职业培训
2024-12-14 15:59:41职业培训
2024-12-14 15:59:41职业培训
2024-12-14 15:59:40职业培训
2024-12-14 15:59:39职业培训
2024-12-14 15:59:38职业培训
2024-12-14 15:59:29职业培训
2024-12-14 15:59:28职业培训
2024-12-14 15:59:28职业培训
2024-12-14 15:59:27职业培训
2024-12-14 15:59:26职业培训
2024-12-22 20:08职业培训
2025-01-01 15:27职业培训
2024-11-27 19:26职业培训
2025-01-07 11:44职业培训
2024-12-22 08:13职业培训
2024-12-02 04:58职业培训
2024-11-29 03:54职业培训
2025-01-07 00:38职业培训
2024-12-14 14:21职业培训
2024-12-13 22:31职业培训
扫码二维码
获取最新动态