Doctrine under Debian with sql server 2008 INSERT INTO Failed

257 Views Asked by At

I try to export a symfony project created with wamp under windows and mysql to an apache server under debian with sql server database, ive used the bundle realestateconz/mssqlbundle and freetds for etablishing connection but ive some problem ...

The first was to make an doctrine:schema:update --force for regenerating the databse, the create unique index query failed, i had to do it myself on the server directly, then now my mini-application works at 50% in fact i can't add an article i got these message :

"An exception occurred while executing 'INSERT INTO article (title, slug, content, createdAt) VALUES (?, ?, ?, ?)' with params ["qsd", "qsdqsdqsd", "qsdqsdqsd", "2015-06-09 12:36:02.000"]":

I don't understand why, i think it's due to the mssql driver, but i'm not sure (maybe the connection or whatever)

EDIT :

as seen here "SQL Server error 1934 occurs on INSERT to table with computed column PHP/PDO"
i have this above as result as the query

5496 ANSI_WARNINGS ANSI_PADDING ANSI_NULLS ARITHABORT QUOTED_IDENTIFIER ANSI_NULL_DFLT_ON CONCAT_NULL_YIELDS_NULL

1

There are 1 best solutions below

0
On

EDIT for @AnnaAdamchuk

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING OFF
GO

CREATE TABLE [dbo].[article](
    [id] [int] IDENTITY(1,1) NOT NULL,
    [title] [nvarchar](255) NOT NULL,
    [slug] [nvarchar](255) NOT NULL,
    [content] [varchar](max) NOT NULL,
    [createdAt] [datetime2](6) NOT NULL,
PRIMARY KEY CLUSTERED 
(
    [id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO