且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

检查重复值后将记录插入表中

更新时间:2023-01-22 16:31:52

您编写的Sql语句中似乎有一个错误.

这是你应该做的
1.通过代码进行调试
2.找到要执行的Sql语句
3.在MS Access上运行此命令,您将收到错误.

我认为并且我不太确定MS Access是否不允许IF Exists
There seems to be an error in the Sql statement you have written.

This is what you should do
1. Debug hrough the code
2. Find the Sql statement which is to be executed
3. Run this on MS access you will get the error.

I think and I am not too sure IF Exists is not allowed in MS Access


除非我只是没有正确阅读此权限,否则好像您忘了在命令对象...应该是这样的:
cmd1.Connection = con
Unless I''m just not reading this right, it looks like you forgot to set the connection property on the command object...should be something like this:
cmd1.Connection = con