Answer the question
In order to leave comments, you need to log in
[Symfony, Doctrine] How to save files to ms sql db using pdo?
Good day!
There is a need to save files in the mssql2008r2 database.
The field is described in orm as follows:
data:
type: blob
nullable: true
length: null
fixed: false
column: Data
SQLSTATE[42000]: [Microsoft][SQL Server Native Client 11.0][SQL Server]Implicit conversion from data type char to varbinary(max) is not allowed. To execute this query, use the CONVERT function.
declare @p1 int
set @p1=NULL
exec sp_prepexec @p1 output,N'@P1 nvarchar(36),@P2 nvarchar(53),@P3 char(1)',N'INSERT INTO [Table] ("Id", "FileName", "Data") VALUES (@P1, @P2, @P3)',N'C8A56AE1-82F8-4CF7-BD8C-6F8254D7806C',N'Новый документ',NULL
select @p1
Answer the question
In order to leave comments, you need to log in
As an option - create a second connection with the type - mssql. It says here that this type of database is supported:
doctrine-orm.readthedocs.org/projects/doctrine-dba...
And in this place, use this connection and run Query Builder?
So have you tried it?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question