Link to home
Start Free TrialLog in
Avatar of cheryl9063
cheryl9063Flag for United States of America

asked on

sql how to convert a Base64 image to Varbinary(Max)

@image_Base64 = varchar(max)

I have a Base 64 image that Im trying to convert to Varbinary(Max) using the code below.. I get the error below when I try to execute.. This and I repeat has nothing to do with indexes

Set @image_Base64 = cast(N'' as xml).value('xs:base64Binary(sql:variable("@BinaryObject_Base64"))','varbinary(max)');
SELECT failed because the following SET options have incorrect settings: 'ANSI_NULLS, QUOTED_IDENTIFIER'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or filtered indexes and/or query notifications and/or XML data type methods and/or spatial index operations.

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of lcohan
lcohan
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of cheryl9063

ASKER

Thanks!