“Data type mismatch in criteria expression.” Error

喜你入骨 提交于 2019-11-29 18:06:46

With OleDb (as you are using) Criteria Mismatch Usually means that the data you are trying to put into the database can't be accepted because the database is expecting a different type of data. (i.e. the database expects an integer and you pass a double to it.) It can be a bit annoying but you'll need to double check all the datatypes of the columns in the database to make sure you are sending something it can handle.

In this case... maybe the the database column of SecretaryUsername is not actually a string? That seems odd but it's been known to happen. Some DB designers will name a field like that even though it contains an integer (to match up with an autonumber) You'll have to look at the Databases's expected datatype to know for sure

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!