How can I fix it: " 'VARBINARY' is not a supported type for CAST" ?
Hi all,
I trying build a project with .NET and Entity Framework in the Code First method, but Caché return the error " 'VARBINARY' is not a supported type for CAST" when run this sql code:
INSERT "dbo"."__MigrationHistory" ( "MigrationId", "ContextKey", "Model", "ProductVersion" ) VALUES ( '201706131048154_InitialCreate', 'CACHE2.SchoolContext', cast( 0x1F8B0800000000000400CD59CD6EE33610BE17E83B083A1 ... d89cc74ff4e1285e7df81769242ce52e1f0000 AS varbinary(1549)), '6.1.3-40302' )
I did all process of this link: https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GBMP_eframe#GBMP_eframe_codefirst.
This SQL was generated by Entity Framework.
I'm using Caché 2015.2.5 version
How I fix it?
Can you execute in SMP:
Not sure why
is unescaped though.
It is not clear what it will give.
To Richard need to save the binary data encoded in hex.
For example, instead of '0x2122232425262728292A2F' to the database should persist the value !"#$%&'()*/
This command was executed by ODBC connection, and I can not change it.
What I need is to use Caché as the database of a .NET application in the CODE FIRST method.
However, even following the manual I mentioned, Caché is returning error in executing SQL above.