我目前正在vb.net中制作一个调度程序应用程序,如下图所示。我希望从表中获取数据,因此在listbox
属性中我添加了datasource
作为表名绑定源,并在显示成员页面中添加了该表的属性。查看右侧的图像,当我按下添加按钮时,我写的条目将保存在数据库中,但不会反映在listbox
中,希望您了解我的问题。请帮忙!添加按钮代码:
db5.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Final Year Project Source Code\bluetooth test\data.mdb"
db5.Open()
strSQLCMD5 = "select * from SCHEDULE;"
rs5.Open(strSQLCMD5, db5, 2, 2)
rs5.AddNew()
rs5.Fields("DATE1").Value = TextBox4.Text()
rs5.Fields("START").Value = TextBox1.Text()
rs5.Fields("STOP").Value = TextBox2.Text()
rs5.Fields("REMARKS").Value = TextBox3.Text()
rs5.Fields("CHANNEL").Value = TextBox5.Text()
rs5.Update()
rs5.Close()
db5.Close()
MsgBox("Scheduled Added Successfully")