Returning Binary Data from ActiveX to SQL Server varbinary(max)
The error -2147211494 (hex 0x80040202) in SQL Server when using “sp_OAMethod” typically indicates a type mismatch or invalid data type issue, particularly when interacting with COM objects that return binary data. The Chilkat ActiveX returns a SAFEARRAY of VT_UI1, which causes the problem explained below. The solution is to instead look for the Chilkat method that returns the binary data as […]