yiisoft / yii2

Yii 2: The Fast, Secure and Professional PHP Framework
http://www.yiiframework.com
BSD 3-Clause "New" or "Revised" License
14.23k stars 6.91k forks source link

Implicit conversion from data type char to varbinary(max) is not allowed #15068

Closed OkyTrilupito closed 6 years ago

OkyTrilupito commented 6 years ago

What steps will reproduce the problem?

i use yii2-admin with sql server, when i create role, assign role and etc, I always get an error. i look this problem just in rbac, cz in other CRUD still work. image

What is the expected result?

how to solve this rbac problem?

What do you get instead?

SQLSTATE[42000]: [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Implicit conversion from data type char to varbinary(max) is not allowed. Use the CONVERT function to run this query. The SQL being executed was: INSERT INTO [auth_item] ([name], [type], [description], [rule_name], [data], [created_at], [updated_at]) VALUES ('test', 1, NULL, NULL, NULL, 1509601715, 1509601715) Error Info: Array ( [0] => 42000 [1] => 257 [2] => [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Implicit conversion from data type char to varbinary(max) is not allowed.

Additional info

Q A
Yii version 2.0.12
PHP version 7.1
Operating system SQL Server
samdark commented 6 years ago

Duplicate of https://github.com/yiisoft/yii2/issues/13436

OkyTrilupito commented 6 years ago

@samdark this problem fixing in version 2.0.13? and this solution is, just waiting for the next version?

samdark commented 6 years ago

Why waiting? http://www.yiiframework.com/news/149/yii-2-0-13-is-released/

OkyTrilupito commented 6 years ago

thank you very much 💃 I am trying to upgrade now 👍