Exception thrown when using RunQuery Service

This forum allows users to post and respond to "How Do I Do ....." questions. The information contained in this forum has not been validated by K-Rise Systems and, as such, K-Rise Systems cannot guarantee the accuracy of the information.
Post Reply
smackie
Posts: 46
Joined: August 26th, 2021, 2:02 pm
Contact:

Exception thrown when using RunQuery Service

Unread post by smackie »

I am trying to use the runquery database service and when I attempt to run it it throws an exception. The query is SELECT max(QDBN03) FROM <xsl:value-of select="$EP_Connection_Database_JDEdwards_TablePath_Data"/>.F560001 where QDNAME='APAHSTAX' and the exception is "The '(' character, hexadecimal value 0x28, cannot be included in a name." Below is the entire exception string that is being thrown. I've verified the query in sql developer.

<Result><Message>The '(' character, hexadecimal value 0x28, cannot be included in a name.</Message><StackTrace> at System.Xml.XmlDocument.CheckName(String name)
at System.Xml.XmlElement..ctor(XmlName name, Boolean empty, XmlDocument doc)
at System.Xml.XmlDocument.CreateElement(String prefix, String localName, String namespaceURI)
at System.Xml.XmlDocument.CreateElement(String name)
at KRise.EASYProcess.Utils.ServiceRow.AddColumn(String columnName, String columnValue) in C:\EASYProcess\EPSources\Git\EASYProcess5_ECC\Utility\ServiceRow.cs:line 115
at KRise.EASYProcess.Workshop.DBWorkshop.Services.RunQuery(Service service) in C:\EASYProcess\EPSources\Git\EASYProcess5_ECC\DBWorkShop\Services.cs:line 1141</StackTrace></Result>
word count: 170

Tags:
SteveCap
Posts: 329
Joined: August 26th, 2021, 9:18 am
Contact:

Re: Exception thrown when using RunQuery Service

Unread post by SteveCap »

You should alias the column. Change the query to:
SELECT max(QDBN03) AS QDBN03 FROM <xsl:value-of select="$EP_Connection_Database_JDEdwards_TablePath_Data"/>.F560001 where QDNAME='APAHSTAX'
word count: 29
smackie
Posts: 46
Joined: August 26th, 2021, 2:02 pm
Contact:

Re: Exception thrown when using RunQuery Service

Unread post by smackie »

Thanks Steve, that worked perfectly and I will make note of this for future reference.
word count: 15
Post Reply