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>
Exception thrown when using RunQuery Service
-
- Posts: 46
- Joined: August 26th, 2021, 2:02 pm
- Contact:
-
- Posts: 329
- Joined: August 26th, 2021, 9:18 am
- Contact:
Re: Exception thrown when using RunQuery Service
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'
SELECT max(QDBN03) AS QDBN03 FROM <xsl:value-of select="$EP_Connection_Database_JDEdwards_TablePath_Data"/>.F560001 where QDNAME='APAHSTAX'
word count: 29
-
- Posts: 46
- Joined: August 26th, 2021, 2:02 pm
- Contact:
Re: Exception thrown when using RunQuery Service
Thanks Steve, that worked perfectly and I will make note of this for future reference.
word count: 15