Ver Mensaje Individual
  #2  
Antiguo 25-01-2012
Paulao Paulao is offline
Miembro
 
Registrado: sep 2003
Ubicación: Rua D 31 Casa 1 - Inhoaíba - Rio de Janeiro - RJ - Brasil
Posts: 637
Reputación: 23
Paulao Va por buen camino
Señores, hizo asi para ver el resultado, o sea, cambie para un valor fijo(60) y saque la validacion(hizo un comentario) y me lo da el error:

Código Delphi [-]
Field name cannot longer than 31 characters.

procedure AddFieldDesc(const FldName: string; FldType, Attributes: Integer);
  var
    FldDesc: TDSDataPacketFldDesc;
  begin
    if Length(FldName) >=  60{SizeOf(FldDesc.szFieldName)} then
      raise EDSWriter.CreateFmt(SFieldNameTooLong,[SizeOf(FldDesc.szFieldName) - 1]);
    FillChar(FldDesc, SizeOf(FldDesc), 0);
    StrLCopy(FldDesc.szFieldName, PChar(FldName), SizeOf(FldDesc.szFieldName) - 1);
    FldDesc.iFieldType := FldType;
    FldDesc.iAttributes := Attributes;
    Check(FIDSWriter.AddColumnDesc(FldDesc));
  end;
Responder Con Cita