If Y = vbYes Then
       Adodc1.Recordset.Fields("续借日期") = Format(Now, "yyyy-mm-dd")
       Adodc1.Recordset.Update
       MsgBox "续借成功"
运行到Adodc1.Recordset.Update时出现这句 我用的是Access表连的,在取记录时代码如下
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=" & App.Path & "\tushu.mdb"
str = "select a.图书号,b.图书名称,b.作者,b.版次,a.借书日期,a.续借日期"
str = str & " from 借还信息表 a inner join 图书信息表 b on a.图书号=b.图书号"
str = str & " where (a.还书日期 is null) and (a.续借日期 is null) "
str = str & " and (a.读者号=" & "'" & Trim(Text1.Text) & "'" & ") order by a.图书号"
Adodc1.RecordSource = str
Adodc1.Refresh
Set DataGrid1.DataSource = Adodc1.Recordset
DataGrid1.Refresh在网上搜索说是缺少主键 我开Access把里面的ID设成了主键 但还是不行