Welcome Guest, Not a member yet? Register   Sign In
Insert binary value into table fails.

(This post was last modified: 11-18-2018, 03:43 PM by PARADISE.)


I use CI as a base to develop a user registration system that stores some data into a SQL Server DB.
Password column datatype is set to binary(16). When I encrypt the password through my app and then try to insert the value into the DB table I get the error: Implicit conversion from data type varchar to binary is not allowed. Use the CONVERT function to run this query. It looks like that CI handles it as varchar and since the datatypes don't match, the error occurs.
Passwords are in this form 0x29E59C9B1ABD5F2DF024CCAC61FBDDDD . How can I handle and send the data to the DB as binary and not varchar?
I tried to change the datatype of the column to archer. It works, but the app doesn't read the data correctly.

Edit: If I create a stored procedure in SQL Server, can I send there data from CI or I'll have the same problem again?

Messages In This Thread
Insert binary value into table fails. - by PARADISE - 11-18-2018, 03:29 PM

Theme © iAndrew 2016 - Forum software by © MyBB