Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 2.0.4
-
Fix Version/s: None
-
Component/s: Platforms
-
Labels:None
-
Environment:XAMP, MsSQL-Server 2008, PHP 5.3.x, MS pdo_sqlsrv_vc6_ts.dll
Description
When trying to insert a value into a Column with type 'image', 'binary' or 'varbinary' the SQLServer states that this is not possible.
When trying to insert into 'binary' or 'varbinary' the error message is:
=> Implicit conversion from nvarchar(max) datatype to varbinary(max) is not allowed.
When trying to insert into 'image' the error message is:
=> Operand collision: nvarchar(max) is incompatible with image.
Doctrine prepares the image/binary/varbinary column in the statements as nvarchar(max) which is wrong.
The cause of this error is that in the MsSQLPlatform::getVarcharTypeDeclarationSQLSnippet($length, $fixed),
or in the datatype mapping which is to 'text'.
The documentation for the MsSQLServer states following conversions (http://207.46.16.252/de-de/library/ms187928.aspx):
*char => binary/varbinary : Explicit conversion
nchar/nvarchar => image : IMPOSSIBLE
So the solution would be, either to leave the datatype blank or use the char/varchar datatype when saving into image/binary/varbinary, which would cause an extra datatype as those would collide with 'text' I guess.
Activity
| Field | Original Value | New Value |
|---|---|---|
| Workflow | jira [ 12637 ] | jira-feedback2 [ 17573 ] |
| Workflow | jira-feedback2 [ 17573 ] | jira-feedback3 [ 19927 ] |
- Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=DBAL-122, expand=changesets[-21:-1].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)
I get the problem, but i don't understand the solutions
Can you explain a bit more?
1. how do i leave a datatype empty? and which one?
2. how do i use char/varchar when saving?
I think this is just a problem of unspecific descriptions