Ver Mensaje Individual
  #1  
Antiguo 07-02-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
Detectar Tipo De Campo

Quiero detectar el tipo de campo de una tabla de mySQL, pero esta funcion que hice no me funciona:

Código Delphi [-]
 
function GetTipoCampoSQL(oQry : TZQuery; Index: Integer) : String;
var TipoField: TFieldDef;
begin
  TipoField := oQry.FieldDefs.Items[Index];
  case TipoField.DataType of
    ftUnknown:     result := 'ftUnknown';
    ftString:      result := 'ftString';
    ftSmallint:    result := 'ftSmallint';
    ftInteger:     result := 'ftInteger';
    ftWord:        result := 'ftWord';
    ftBoolean:     result := 'ftBoolean';
    ftFloat:       result := 'ftFloat';
    ftCurrency:    result := 'ftCurrency';
    ftBCD:         result := 'ftBCD';
    ftDate:        result := 'ftDate';
    ftTime:        result := 'ftTime';
    ftDateTime:    result := 'ftDateTime';
    ftBytes:       result := 'ftBytes';
    ftVarBytes:    result := 'ftVarBytes';
    ftBlob:        result := 'ftBlob';
    ftMemo:        result := 'ftMemo';
    ftGraphic:     result := 'ftGraphic';
  end;
end;

Cuales son los FieldDef de mySQL ???
__________________
Código Delphi [-]
 
try 
ProgramarMicro(80C52,'Intel',MnHex,True);
except
On Exception do
MicroChip.IsPresent(True);
end;
Responder Con Cita