Skip to content

cannot insert file binary #1

@harry-chin

Description

@harry-chin

I tried to put binary file(varbinary(max)) into sql server using this library.
fileBinary data type is QByteArray.

        auto queryResult = Query(FILE)
            .insert({"customer_id", "file_name", "file_binary"})
            .values({customerId, fileName.data(), fileBinary})
            .perform();

This is causing follows;
StatementError: [Microsoft][ODBC SQL Server Driver][SQL Server]Implicit conversion from data type varchar(max) to varbinary(max) is not allowed. Use the CONVERT function to run this query. QODBC3: Unable to execute statement

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions