function RunQuery(listParamInClient, listParamOutClient, callBack) { var DNI = ''; var NOMBRES = ''; var APELLIDOS = ''; for (var i = 0; i < listParamInClient.length ; i++) { if (listParamInClient[i][0] == 'DNI') DNI = listParamInClient[i][1]; } var response = { Response: false, Message: '', Data: [] } var Param = new SysCfg.Stream.Properties.TParam(); try { Param.Inicialize(); Param.AddString('DNI', DNI, SysCfg.DB.Properties.TMotor.None, SysCfg.DB.Properties.TExtra.None, SysCfg.DB.Properties.TStyle.Normal); var openDataSet = SysCfg.DB.SQL.Methods.OpenDataSet("Atis","ConsultaDNI", Param.ToBytes()); var ResErr = openDataSet.ResErr; if (ResErr.NotError) { openDataSet.DataSet.First(); if (!(openDataSet.DataSet.Eof)) { NOMBRES = openDataSet.DataSet.RecordSet.FieldName('NOMBRES').asString(); APELLIDOS = openDataSet.DataSet.RecordSet.FieldName('APELLIDOS').asString(); for (var i = 0; i < listParamOutClient.length ; i++) { if (listParamOutClient[i] == 'NOMBRES') response.Data.push([listParamOutClient[i], NOMBRES]) if (listParamOutClient[i] == 'APELLIDOS') response.Data.push([listParamOutClient[i], APELLIDOS]) } response.Response = true; } else { openDataSet.ResErr.Mesaje = "RECORDCOUNT = 0"; } } response.Message = openDataSet.ResErr.Mesaje } catch (e) { SysCfg.Log.Methods.WriteLog("RunQuery", e); response.Message = e.message; } finally { Param.Destroy(); callBack(response); } } RunQuery(listParamInClient, listParamOutClient, callBack);