I am trying to migrate a MS Access application from MS Access 2003 to MS Access 2010.
The application connects to Oracle using ODBC also link tables to Oracle. The application is accessed using Citrix environment.
The issue we are facing is in SQL Delete statement from MS Access, it's not deleting the records properly and leaving one or two records in the oracle table. We tried lot of forums but we didn't get any help from any. The same statements are running fine if we execute in ORACLE directly.
Its a straight Delete * from table_name statement. We are trying to delete all the records from the table.
答案 0 :(得分:0)
所以经过几天的努力,我找到了另一种做同样事情的方法。哪个有效,但是,我写了一个select语句并在记录集上做了类似下面的删除。
Set dbs = CurrentDb
DoCmd.Hourglass True
Set wrkdefault = DBEngine.Workspaces(0)
strSQL = "Select * FROM tp007_multi_locs"
Set rs = dbs.OpenRecordset(strSQL, dbOpenDynaset)
If rs.EOF Then GoTo ExitHere
wrkdefault.BeginTrans
Do Until rs.EOF
rs.Delete
rs.MoveNext
Loop
wrkdefault.CommitTrans
rs.Close
dbs.Close
我没有解释为什么“删除*来自tp007_multi_locs”无效。