Código :
listA_ls.addEventListener("change",editar); function editar(Obj) { DatosGrid = Obj.target.selectedItem; Activo_txt.text = DatosGrid.Activo; Serie_txt.text = DatosGrid.Serie; Ingreso_txt.text = DatosGrid.Ingreso; Descripcion_txt.text = DatosGrid.Descripcion; Depreciacion_txt.text = DatosGrid.Depreciacion; Inventario_txt.text = DatosGrid.Inventario; Valor_txt.text = DatosGrid.Valor; Rotulo_txt.text = DatosGrid.Rotulo; Responsable_txt.text = DatosGrid.Responsable; Localizacion_txt.text = DatosGrid.Localizacion; } pasarR.onRelease = function() { if (Descripcion_txt.text == "") { Descripcion_txt.text = "Este campo no puede estar vacio"; } else { mdm.Database.MSAccess.runQuery("INSERT INTO devof (Activo,Serie,Ingreso,Descripcion,Depreciacion,Inventario,Valor,Rotulo,Responsable,Localizacion) VALUES ('"+Activo_txt.text+"','"+Serie_txt.text+"','"+Ingreso_txt.text+"','"+Descripcion_txt.text+"','"+Depreciacion_txt.text+"','"+Inventario_txt.text+"','"+Valor_txt.text+"','"+Rotulo_txt.text+"','"+Responsable_txt.text+"','"+Localizacion_txt.text+"')"); consulta(); Activo_txt.text = ""; Serie_txt.text = ""; Ingreso_txt.text = ""; Descripcion_txt.text = ""; Depreciacion_txt.text = ""; Inventario_txt.text = ""; Valor_txt.text = ""; Rotulo_txt.text = ""; Responsable_txt.text = ""; Localizacion_txt.text = ""; LineaGrid = listA_ls.selectedIndex; if (LineaGrid != undefined) { var sqlString:String = "DELETE FROM devolutivos_almacen where Id="+listA_ls.getItemAt(LineaGrid).Id; mdm.Database.MSAccess.runQuery(sqlString); listA_ls.removeItemAt(LineaGrid); } } };
mi pregunta es, si el inserta datos en acces pero como me las arreglo para que e inserte datos en dos tablas al mismo tiempo...intente duplicando el codigo y cambiando el nombre de la tabla pero es uy estricto y solo inserta en una y en la otra no...como lo hago??? Graciasd
