c# - Data type mismatch in criteria expression exception -


when run code gives me mismatch criteria exception"

enter image description here

enter image description here

remove quotes amounts , category_id

"update products set amount=" + amount1 + " category_id=" + temp; 

this build correct sql string.

btw encourage use query parameters queries https://msdn.microsoft.com/it-it/library/system.data.oledb.oledbcommand.parameters(v=vs.110).aspx


Comments

Popular posts from this blog

mysql - FireDac error 314 - but DLLs are in program directory -

git - How to list all releases of public repository with GitHub API V3 -

c++ - Getting C2512 "no default constructor" for `ClassA` error on the first parentheses of constructor for `ClassB`? -