Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: The support homepage carousel is not displaying. We are working toward a resolution.

System.Byte[] Error when Loading Binary Data Type

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
Sonja_Bauernfeind
Digital Support
Digital Support

System.Byte[] Error when Loading Binary Data Type

Last Update:

Oct 28, 2021 3:39:42 AM

Updated By:

Sonja_Bauernfeind

Created date:

Apr 9, 2019 10:14:48 AM

The error System.Byte[] was occurring when attempting to load data from a binary data type column from MS SQL Server database.

Environment:
Qlik Sense Enterprise on Windows any version

Resolution:

This issue was resolved by creating a new column in the SQL Server database and converting the column to be varchar data type. Then this new varchar column could be read into Qlik Sense without any error.

This type of conversion function was used in the database in the process to create the new column:
Convert(NVARCHAR(MAX), "FieldName", 1) as Varchar_FieldName.

See Data Types for available Data Types in Qlik Sense. 

Labels (1)
Comments
janyf
Partner - Creator
Partner - Creator

I was able to extract varchar(max) binary as base64  into qlik via this select 

select id,
cast('' as xml).value(
'xs:base64Binary(sql:column("tbl_data.BINARYDATA"))', 'varchar(max)'
) as Data_binary
from "db".dbo."tbl_data";

d-schmidt
Contributor
Contributor

Hi, I had this Error when using QvODBCConnectorPackage in QlikView and trying to Select a timestamp-Field (The data type "timestamp" is kind of a binary value and has nothing to do with DateTime or Time) from a MSSQL-Database.

Unfortunately every table in the database has a timestamp field in it. So SELECT * was not possible without getting above Error-Message in the connector log.

In the install folder of the connector package there is a config file, which lets you specify how different data types are interpreted by the connector.
C:\Program Files\Common Files\QlikTech\Custom Data\QvODBCConnectorPackage\qlikview.qliksourceconfig

Here I found the node <SourceConfiguration id="mssql" displayName="Microsoft SQL Server"> and within this node there are all TypeMappings to be found.
For the SourceType "timestamp" I changed the QvxFieldType from "Time" to "String". 

Now the error is gone, but in QV now every value in the timestamp fields is 'System.Byte[]'. 

We don't need the field anyway. But at least for our QV legacy QVD generators SELECT * is working again. 😄

Cheers!

Contributors
Version history
Last update:
‎2021-10-28 03:39 AM
Updated by: