I
I
Ivan Melnikov2018-04-18 13:46:24
MySQL
Ivan Melnikov, 2018-04-18 13:46:24

How to accept BLOB data from MS SQL in MySQl?

The photo lies in MS SQL in the field of type IMAGE. You need to pass it to MySQL in a BLOB field.
Is the MySQL function correctly written, which is called on the MS SQL side to write to MySQL:

CREATE FUNCTION insert_photo(_img BLOB) RETURNS INT
BEGIN
INSERT INTO Photo(img) VALUE(_img);
return LAST_INSERT_ID();
END

Or is it impossible to transfer BLOB data this way and you need to use, for example, encoding IMAGE -> BASE64 -> BLOB ?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question