Posted by Bouwput in SWF Studio V3 on Feb 04 2011, 07:38 am

I'm currently creating an app to do some bulk datamanipulation from an Access database to multiple Excel sheets output.

Reading the info from the Access database using execSQL and XML_ATTRIBS rowformat gives me some pretty messed up output regarding special characters. I'm asuming escaping and unescaping get's dubbled up somehow because of the database encoding (ascii).

Is there any workaround besides setting the rowformat to URL?


Posted by northcode in SWF Studio V3 on Feb 04 2011, 09:30 am

Without seeing the problem there's not much we can do to help you. Can you provide a sample database and some code to show what you're reading and how you think it's "messed up"?


Posted by Bouwput in SWF Studio V3 on Feb 04 2011, 09:47 am

Database is attached.

Some code sample:


private function runQuery($query:String){
ssCore.ADO.setSQL({sql:$query}, {callback:queryResult});
ssCore.ADO.open();
}

private function queryResult($result:Object, $callback:Object,$error:Object){
ssCore.ADO.getRows({rows:-1},{callback:retrieveRows});
}

private function retrieveRows($result:Object, $callback:Object, $error:Object){
if($result.success){
var resultXML:XML = new XML($result.result);
}else{
//
}
}
runQuery("SELECT tts_nr, tts_oms, tts_versie_dat FROM Toets");


Output row:

<row>
    <field name="tts%5fnr" value="67"/>
    <field name="tts%5foms" value="TMT Krt 1 Plattel%c3%a2n"/>
    <field name="tts%5fversie%5fdat" value="25%2d9%2d2001"/>
</row>


Adding unescape to the result:

var resultXML:XML = new XML(unescape($result.result));


Output row:

<row>
    <field name="tts_nr" value="67"/>
    <field name="tts_oms" value="TMT Krt 1 Plattelân"/>
    <field name="tts_versie_dat" value="25-9-2001"/>
</row>


So the characters in the value don't get properly unescaped in the field tts_oms value.

Thx for looking in to it!

attachments: LOVS4_Toetsdefinities.zip