Book a Demo

Author Topic: Repository.SQLQuery() treats empty string values as bin.base64  (Read 3456 times)

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Hey everybody,


Repository.SQLQuery() goes crazy and starts hallucinating binary data when face with an empty string in the query results.

Instead of returning just an empty or self-closing XML tag, you get
    <ColumnName xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="bin.base64"></ColumnName>

This is on 15.0.1512 on Windows 10/64 and an eapx repository.
Can someone check if it's still broken in 15.1 or 15.2?

Try
Code: (VBScript) [Select]
Session.Output Repository.SQLQuery("Select null as NullVal")
Session.Output Repository.SQLQuery("Select ' ' as SpaceString")
Session.Output Repository.SQLQuery("Select '' as EmptyString")

Null gives a self-closing tag.
A string with a whitespace gives an XML tag with a whitespace.
An empty string gives the result above.


/Uffe
My theories are always correct, just apply them to the right reality.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Repository.SQLQuery() treats empty string values as bin.base64
« Reply #1 on: August 07, 2020, 09:23:33 pm »
Can't do that on EAP. Sorry.

q.