May 02, 2020 11:05 AM|PatriceSc|LINK
Ok but how about showing actually the error message you have so that others don't have to read your code and guess which message you SEE ?
Not directly related but your approach is likely counterproductive ie on a production server you won't have a console to show the error message and you don't check the return value. So the error will be basically hidden or you'll see another later error
caused by this hidden errror.
Edit: for now you we know you have an error on the SQL side but it could be absolutely anything from a wrong connection string, to a wrong column name or a string size that is exceeding the allowed length etc etc... It's best to always start from the actual
error message rather than trying to guess.