我正在尝试使用MS-ACCESS中的以下代码删除特定行。我使用VBA创建了一个表单并使用此代码
Dim dbs As Database
Dim MyDate
MyDate = Date
Set dbs = CurrentDb
If IsNull(Me.Text72.Value) Then
MsgBox "Values are Missing"
Else
'dbs.Execute "insert into scott_synonym_cidm (id,synonym_cidm,source,status,username,updatedate) values ( '" & Me.id.Value & "' ,'" & Me.syn_name.Value & "','" & Me.system.Value & "','YES','" & Me.Text72.Value & "','" & MyDate & "')"
'MsgBox "Record Inserted "
dbs.Execute "delete from scott_unmatched where tradename = '300MM SODIUM CARBONATE' "
MsgBox "Record deleted "
End If
dbs.Close
Set dbs = Nothing
当我运行此行时,行将插入表中,但在执行delete语句时会出错。
这些表与Oracle有联系。