vb与数据库连接
的有关信息介绍如下:在这句话Set DataGrid1.DataSource = adoStudens
后面加上
DataGrid1.Refresh
试试
.Recordset.AddNew
.Recordset.Fields(0)= Trim$(txtNo.text)
.Recordset.Fields(1)= Trim$(CboYBBH.text)
.Recordset.Fields(2) = Trim$(CboBJBH.text)
.Recordset.Fields(3)= Trim$(txtName.text)
.Recordset.Fields(4)= Trim$(cboSex.text)
.Recordset.Fields(5)= DTPicker1.Value
.Recordset.Fields(6)= Trim$(txtAdress.text)
.Recordset.Fields(7)= Val(txtPhone.text)
.Recordset.Fields(8)= Trim$(txtEmail.text)
.Recordset.Fields(9)= Trim$(txtCV.text)
.Recordset.Update
改成这样试试!
在下面这行之前 添加一行 .Refresh
你在ConnectionString里面有没有设置???连接号数据库了么?