Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > OOP
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos

Coloboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #12  
Antiguo 25-08-2010
Avatar de julyus
julyus julyus is offline
Miembro
 
Registrado: jul 2006
Ubicación: IN TO PLACES COLOMBIA AND EE.UU
Posts: 121
Poder: 21
julyus Va por buen camino
este es el codigo mas o menos

aqui es donde llamo el array para pasarlo a otro array creo que esta mal
la sintaxis de como hacerlo


Código Delphi [-]
type
    TEventslistArray = array[0..58] of variant;
    TNewArrayData = array[0..58] of variant;

declaracion de la funcion
Código Delphi [-]
 function SearchEvents(sIMEI: string; iCompanyId : integer;  sVehicleId : string;
            iCurrSpeed,iCurrRPM,iAccDeccValue :integer;
            bDIN1, bDIN2, bDIN3, bDIN4 : Boolean;
            fAIN1, fAIN2,  fAIN3, fAIN4 : Extended;
            iGSMSignal, iCurrentProfile : integer;
            fAcelerometerData, fGPSSpeed,  fPowerSuplyVoltage, fBatteryVoltage, fBatteryCurrent,
            fGPSPower, fPCBTemperature, fTempSensor1, fTempSensor2,
            fTempSensor3, fFuelCounter, sButtonInput, fCan0, fCan1,
            fCan2, fCan3, fCan4, fCan5, fCan6, fCan7, fCan8,  fCan9 : Extended;
            bGeoZone1, bGeoZone2, bGeoZone3,
            bGeoZone4, bGeoZone5, bGeoZone6, bGeoZone7,
            bGeoZone8, bGeoZone9, bGeoZone10, bGeoZone11,
            bGeoZone12, bGeoZone13, bGeoZone14, bGeoZone15,
            bGeoZone16, bGeoZone17, bGeoZone18, bGeoZone19, bGeoZone20 : Boolean;
            fVirtualOdometer : Extended; sCurrOperatorCode : string; bMovement : Bool ) :TEventslistArray;

funcion

uso de la funcion aqui es donde me marca el error
Código Delphi [-]

  NewArrayData := SearchEvents(sIMEI, iCompanyId, sVehicleId,
            iCurrSpeed,iCurrRPM,iAccDeccValue,
            bDIN1, bDIN2, bDIN3, bDIN4,
            fAIN1, fAIN2,  fAIN3, fAIN4,
            iGSMSignal, iCurrentProfile ,
            fAcelerometerData, fGPSSpeed,  fPowerSuplyVoltage, fBatteryVoltage, fBatteryCurrent,
            fGPSPower, fPCBTemperature, fTempSensor1, fTempSensor2,
            fTempSensor3, fFuelCounter, sButtonInput, fCan0, fCan1,
            fCan2, fCan3, fCan4, fCan5, fCan6, fCan7, fCan8,  fCan9,
            bGeoZone1, bGeoZone2, bGeoZone3,
            bGeoZone4, bGeoZone5, bGeoZone6, bGeoZone7,
            bGeoZone8, bGeoZone9, bGeoZone10, bGeoZone11,
            bGeoZone12, bGeoZone13, bGeoZone14, bGeoZone15,
            bGeoZone16, bGeoZone17, bGeoZone18, bGeoZone19, bGeoZone20,
            fVirtualOdometer, sCurrOperatorCode, bMovement);

la funcion no esta terminada lo que quiero de esta funcion es que me ingrese unos datos y si hay unos casos cumplidos me genere un array con
el registro primero ingresado y luego los casos cunplidos me generelos unos
nuevos rows repetidos solo con los casos cumplidos afectaran unas variables y generaran un nuevo row

ejemplo

a,b,c insert row en el array

entran a b y c
si c = 0 se evaluan
si c= o tonces escribe a,b y c= '123' en el array
fin

si c= 1
si c= o tonces escribe a,b y c= '321' en el array a regresar

alfinal

deben quedarme 3 rows
1 original
2 cambiado
3 cambiado

fin de la funcion


Código Delphi [-]
function TFMListenerService.SearchEvents(sIMEI: string; iCompanyId : integer;  sVehicleId : string;
            iCurrSpeed,iCurrRPM,iAccDeccValue :integer;
            bDIN1, bDIN2, bDIN3, bDIN4 : Boolean;
            fAIN1, fAIN2,  fAIN3, fAIN4 : string;
            iGSMSignal, iCurrentProfile : integer;
            fAcelerometerData, fGPSSpeed,  fPowerSuplyVoltage, fBatteryVoltage, fBatteryCurrent,
            fGPSPower, fPCBTemperature, fTempSensor1, fTempSensor2,
            fTempSensor3, fFuelCounter, sButtonInput, fCan0, fCan1,
            fCan2, fCan3, fCan4, fCan5, fCan6, fCan7, fCan8,  fCan9 : string;
            bGeoZone1, bGeoZone2, bGeoZone3,
            bGeoZone4, bGeoZone5, bGeoZone6, bGeoZone7,
            bGeoZone8, bGeoZone9, bGeoZone10, bGeoZone11,
            bGeoZone12, bGeoZone13, bGeoZone14, bGeoZone15,
            bGeoZone16, bGeoZone17, bGeoZone18, bGeoZone19, bGeoZone20 : Boolean;
            fVirtualOdometer : string; sCurrOperatorCode : string; bMovement : Bool ) :TEventslistArray;
var
count : integer;
Conn: IConnection;
sqlQuery : TADOQuery;
ADOSP: TADOStoredProc;
EvenType : string;
EvenCode  : integer;
begin




  // consulto datos
  if iCurrSpeed then
  begin

  //ejecuto el storeprocedure
  ADOSP.Connection := Conn; // paso el string de conexion
  ADOSP.ProcedureName := 'GetOverSpeed'; // pongo el nombre del SP que voy a utilizar
  ADOSP.Parameters.Refresh; // creo los parametros que espera el SP
  ADOSP.Parameters.ParamByName('@CompanyId').Value  := iCompanyId;
  ADOSP.Parameters.ParamByName('@CarNumber').Value  := sVehicleId;
  ADOSP.Parameters.ParamByName('@Speed').Value  := iCurrSpeed;
  ADOSP.Parameters.ParamByName('@EventType').Direction := EvenType;
  ADOSP.Parameters.ParamByName('@EventCode').Direction :=  EvenCode;


  end;
  ADOSP.Close;
  ADOSP.Free;
  //asigno a el arreglo


  ADOSP.Connection := Conn; // paso el string de conexion
  ADOSP.ProcedureName := 'GetOverRpm'; // pongo el nombre del SP que voy a utilizar
  ADOSP.Parameters.Refresh; // creo los parametros que espera el SP
  ADOSP.Parameters.ParamByName('@CompanyId').Value  := iCompanyId;
  ADOSP.Parameters.ParamByName('@CarNumber').Value  := sVehicleId;
  ADOSP.Parameters.ParamByName('@Factor').Value  := iCurrSpeed;
  ADOSP.Parameters.ParamByName('@EventType').Direction := EvenType;
  ADOSP.Parameters.ParamByName('@EventCode').Direction := EvenCode;
  //consuto datos


  if iCurrRPM   then
  begin

  end;
  //asigno a el arreglo


  ADOSP.Connection := Conn; // paso el string de conexion
  ADOSP.ProcedureName := 'GetOverSpeed'; // pongo el nombre del SP que voy a utilizar
  ADOSP.Parameters.Refresh; // creo los parametros que espera el SP
  ADOSP.Parameters.ParamByName('@CompanyId').Value  := iCompanyId;
  ADOSP.Parameters.ParamByName('@CarNumber').Value  := sVehicleId;
  ADOSP.Parameters.ParamByName('@AccelDecel').Value  := iCurrSpeed;
  ADOSP.Parameters.ParamByName('@EventType').Direction := EvenType;
  ADOSP.Parameters.ParamByName('@EventCode').Direction :=  EvenCode;
  //consulto
  if iAccDeccValue then
  begin

  end;
  //asigno a el arreglo


end;
Responder Con Cita
 


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Cosulta de BDF no regresa nada eduardo_2009 Tablas planas 3 21-08-2007 15:00:49
??que regresa un query?? david duarte Tablas planas 5 22-05-2006 17:04:53
Funcion SUM me regresa una cadena paty_rlopez Firebird e Interbase 6 18-04-2006 15:13:10
SQLClientDataSet no regresa lo esperado EITB OOP 2 27-09-2004 18:45:25
Como devuelvo un Arreglo en Función Prophoenix Varios 1 30-05-2003 19:40:58


La franja horaria es GMT +2. Ahora son las 17:43:21.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi