5 Replies Latest reply on Jun 24, 2010 7:07 AM by Sebastien V.

    Error #2044: ioError non pris en charge

    dhifallah Level 1

      Hi,

       

       

      I'm tring to connect to myy database usingg assql to update it with the new value entred in my datagrid , but my database is not updated and I have the following error:

       

      Error #2044: ioError non pris en charge  : text=Error #2048: Violation de la sécurité Sandbox : http://localhost:8080/SupportStarwebJ2EE/EcranGestionEnvironnement.swf ne peut pas charger de données à partir de jdbc:mysql://localhost:3306/:3306.

       

       

       

      here is a part of my code:

       

      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:assql="com.maclema.mysql.mxml.*" layout="absolute"

      creationComplete="initApp()">

       

      <mx:Script>

       

      <![CDATA[

      import com.maclema.mysql.events.MySqlErrorEvent;

      import com.maclema.util.ResultsUtil;

      import com.maclema.mysql.events.ResponseEvent;

      .....

      .....

      ....

       

       

      private

       

      function postEdit():void{

       

       

      if (boolStateNew == false){

      service.send(

      "UPDATE `Supportweb`.`gestion_environnement_bis` set branche_SVN ='"+ branche_SVN

      +

      "' where IDTable='"+ itemDG.selectedItem.branche_SVN +"'");

       

      service.send(

      "UPDATE `Supportweb`.`gestion_environnement_bis` set environnement ='"+

      environnement +

      "' where IDTable='"+ itemDG.selectedItem.environnement +"'");

       

      service.send(

      "UPDATE `Supportweb`.`gestion_environnement_bis` set tag_version ='"+ tag_version

      +

      "' where IDTable='"+ itemDG.selectedItem.IDTable

      +

      "'");

       

       

      .....

      .....

      Alert.show(

      "updated");

       

      //cancelEdit();

      service.send(

      "SELECT * FROM `Supportweb`.`gestion_environnement_bis`");

      }

       

      else

      {

      service.send(

      "INSERT INTO `Supportweb`.`gestion_environnement_bis`(`branche_SVN`,`environnement` ,`tag_version`,`revision_ihm`,`revision_metier`,`date_initialisation`,`version_cible`,`lo t_cible`,`liste_organisme`) VALUES ('" + branche_SVN + "' , '" + environnement + "', '" + tag_version + "', '" +revision_ihm +"', '" +revision_metier +"' ,'"+date_initialisation+"', '"+version_cible+"', '"+lot_cible+"','"+liste_organisme+"')");

      Alert.show(

      "les modifications sont bien insérées dans la base de données ...");

       

      service.send(

      "SELECT * FROM `Supportweb`.`gestion_environnement_bis`");

      }

      }

       

       

      private function handleConnected(e:Event):void {

       

      service.send(

      "SELECT * FROM `Supportweb`.`gestion_environnement_bis`");

       

      }

       

       

      private function handleError(e:MySqlErrorEvent):void {

      Alert.show(e.msg);

      }

       

       

       

       

      // Define event listener for the itemEditEnd event.

       

      private function getCellInfo(event:DataGridEvent):void

      {

       

      // Get the cell editor and cast it to TextInput.

       

      var myEditor:TextInput = TextInput(event.currentTarget.itemEditorInstance);

       

       

      // Get la nouvelle valeur de l'editor.

       

      var newVal:String = myEditor.text;

       

       

      // Get l'ancienne valeur.

       

      var oldVal:String = event.currentTarget.editedItemRenderer.data[event.dataField];

       

      var sColName:String = event.currentTarget.editedItemRenderer.data["IDTable"];

       

       

      if(oldVal!= newVal)

      {

      service.send(

      "UPDATE `Supportweb`.`gestion_environnement_bis` set branche_SVN ='"+ newVal

      +

      "'where IDTable='"+ sColName +"'");

      Alert.show(

      "Actualisé");

      Alert.show(

      "Vous avez effectué les modifications suivantes:\n Ligne, Colonne: " + event.rowIndex + ", " + event.columnIndex + "\n La nouvelle valeur: " + newVal + "\n L'ancienne valeur: " + oldVal , "Attention!");

      }

      }

       

      </mx:Script>

       

      <assql:MySqlService id="service"

      hostname="

      jdbc:mysql://localhost:3306/"

      username="

      supportweb"

      password="

      supportweb"

      database="

      Supportweb"

      autoConnect="

      true"

      connect="handleConnected(event)"

      sqlError="handleError(event)"

      />

       

      <mx:DataGrid id="itemDG" dataProvider="{dpValue}" itemEditEnd="getCellInfo(event);" editable="true" width="1411" height="297" y="67.45" x="9.15">

       

       

      <mx:columns>

       

       

      ..........

      ..........