Sql server image field cannot update

there is a image column in a form, after choosing the pictures , it cannot update to the sql server database.

the error is :
SQLState: 22018 Error Code: 206 Message: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Operand type clash: text is incompatible with image

but the field in the database is image type, I don’t know what cause the text incompatible problem.

is this a bug ?

1 Like

The form is copied from another project, it didn’t work on new project, but work on old project.

Is there something missing or the copy process is not working well ?

1 Like

keeping images in the database is not the best practice, you should consider keep images in the folders. (type Image - file name ) , not Image - database.

It’s only few records, that’s why I stored the image in database

1 Like

I found it, it’s the database connection, I changed the "mssql server native srv " to “mssql server native srv pdo” . it works fine

thanks all friends.

1 Like