Ver Mensaje Individual
  #8  
Antiguo 04-04-2009
Avatar de MaMu
MaMu MaMu is offline
Miembro
 
Registrado: abr 2006
Ubicación: Argentina
Posts: 863
Reputación: 19
MaMu Va por buen camino
Cita:
Empezado por roman Ver Mensaje
Tendrías que mostrarnos cómo estás añadiendo los campos y en qué momento. Tal como dije antes, el ejemplo que puse funciona correctamente y con un campo calculado (...)
Si los campos los añades (todos) manualmente, necesariamente debe darte la cuenta, sin importar el tipo de campo.
Si roman, funciona correctamente. Ahora continuando con el debbug de todo el proceso, descubro que el error proviene de la siguiente funcion:

Código Delphi [-]
 
type
   TTipoCampo = (tcINTEGER, tcSTRING, tcDOUBLE, tcCURRENCY, tcBOOLEAN, tcDATE, tcMEMO);
 
function GetTipoCampoSQL(oQry : TZQuery; Index: Integer) : TTipoCampo;
var TipoField: TFieldDef;
begin
  TipoField := oQry.FieldDefs.Items[Index];
  case TipoField.DataType of
    ftUnknown:        result := tcSTRING;
    ftString:         result := tcSTRING;
    ftSmallint:       result := tcBOOLEAN;
    ftInteger:        result := tcINTEGER;
    ftWord:           result := tcDOUBLE;
    ftBoolean:        result := tcBOOLEAN;
    ftFloat:          result := tcDOUBLE;
    ftCurrency:       result := tcCURRENCY;
    ftBCD:            result := tcSTRING;
    ftDate:           result := tcDATE;
    ftTime:           result := tcDATE;
    ftDateTime:       result := tcDATE;
    ftBytes:          result := tcDOUBLE;
    ftVarBytes:       result := tcDOUBLE;
    ftAutoInc:        result := tcINTEGER;
    ftBlob:           result := tcMEMO;
    ftMemo:           result := tcMEMO;
    ftGraphic:        result := tcMEMO;
    ftFmtMemo:        result := tcMEMO;
    ftParadoxOle:     result := tcMEMO;
    ftDBaseOle:       result := tcMEMO;
    ftTypedBinary:    result := tcMEMO;
    ftCursor:         result := tcMEMO;
    ftFixedChar:      result := tcMEMO;
    ftWideString:     result := tcSTRING;
    ftLargeint:       result := tcINTEGER;
    ftADT:            result := tcINTEGER;
    ftArray:          result := tcSTRING;
    ftReference:      result := tcINTEGER;
    ftDataSet:        result := tcINTEGER;
    ftOraBlob:        result := tcSTRING;
    ftOraClob:        result := tcSTRING;
    ftVariant:        result := tcINTEGER;
    ftInterface:      result := tcINTEGER;
    ftIDispatch:      result := tcINTEGER;
    ftGuid:           result := tcSTRING;
    ftTimeStamp:      result := tcINTEGER;
    ftFMTBcd:         result := tcSTRING;
  end;
end;

Cuyo error es:

---------------------------
Debugger Exception Notification
---------------------------
Project Test.exe raised exception class EListError with message 'List index out of bounds (15)'. Process stopped. Use Step or Run to continue.
---------------------------
OK Help
---------------------------

Nota: la definición si o si la tengo que modificar con esa función puesto a que diversos campos deben ser re-adaptados a otro tipo de datos. Esto funcionó perfectamente hasta que puse un campo calculado.
__________________
Código Delphi [-]
 
try 
ProgramarMicro(80C52,'Intel',MnHex,True);
except
On Exception do
MicroChip.IsPresent(True);
end;
Responder Con Cita