XMl Client Bug

Bernd Gollesch <[email protected]>
Newsgroups gmane.comp.lang.4gl.aubit.general
Message-ID <[email protected]>
Hoi,

we are in the process of making our own XML-client for aubit.

When using the contruct statement the triggered response caused an error 
in the 4gl programm.

We found out that the field order of the response must be the same as 
the one from the construct statement otherwise the resulting SQL string 
uses the values for the wrong fields. It looks like the mapping is done 
index-based instead of using the fieldname from the response.

Small example, 4gl-program sends:
<CONSTRUCT>
	<FIELDLIST>
		<FIELD NAME="text_field"/>
		<FIELD NAME="date_field"/>
	</FIELDLIST>
	<COLUMNS>
		<COLUMN NAME="tab.text_field"/>
		<COLUMN NAME="tab.date_field"/>
	</COLUMNS>
</CONSTRUCT>

and xml-client response with:
<TRIGGERED ID="ACCEPT" >
	<SVS>
		<SV FN="date_field" T="1"/>
		<SV FN="text_field" T="1">TEST</SV>
	</SVS>
</TRIGGERED>

This will result in " tab.date_field = 'TEST'" for the constructed sql 
string, which will end in an error.

It also looks like this only happens for the ACCPET trigger. An "AFTER 
FIELD" trigger worked without problems.

-- 
cu, Bernd

------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.