Sparx Systems Forum

Enterprise Architect => Bugs and Issues => Topic started by: Uffe on August 07, 2020, 08:31:31 pm

Title: Repository.SQLQuery() treats empty string values as bin.base64
Post by: Uffe on August 07, 2020, 08:31:31 pm
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
Title: Re: Repository.SQLQuery() treats empty string values as bin.base64
Post by: qwerty on August 07, 2020, 09:23:33 pm
Can't do that on EAP. Sorry.

q.