MS Access更新链接表产生无效的参数错误 [英] MS Access updating linked table producing invalid argument error
问题描述
我正在尝试通过MS Access更新SQL Server中的链接表,但出现了Invalid argument
错误.有人知道如何解决此错误吗?
I am trying to update a linked table in SQL Server through MS Access and I am getting an Invalid argument
error. Does anyone know how to fix this error?
更新1
这是我正在拨打的电话,但失败了:
This is the call I am making and it is failing:
sql = "UPDATE user INNER JOIN myusers ON user.userid = myuser.UserId SET myuser.division= user.division;"
CurrentProject.Connection.Execute sql, , adExecuteNoRecords
sql = "UPDATE user INNER JOIN myusers ON user.userid = myuser.UserId SET myuser.division= user.division;"
CurrentProject.Connection.Execute sql, , adExecuteNoRecords
更新2
我将链接表转换为本地表,并应用了相同的更新,更新成功.我认为这是由于ODBC连接所致,也许有人可以启发我.
I converted the linked table to be local and applied the same update and the update was successful. I think this is due to the ODBC connection, may be someone can enlighten me on this.
推荐答案
碰巧这是一个PK问题.链接表的PK引起了问题.
It happens that it was a PK issue. The linked table had a PK that was causing problems.
这篇关于MS Access更新链接表产生无效的参数错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!