Ver Mensaje Individual
  #1  
Antiguo 23-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
Problemas con Data Packet

Buenos dias, estoy con un problema asi: Mi aplicacion cria un campo en ejecucion, que llamo de campo customisable. Que pasa es que hay un limite para la cantidad de caracteres(31) y tengo un campo que necesita de 36. Luego, intente cambiar para 60 y no he logrado exito. Exist una variable del tipo TDSDataPacketFldDesc que es declarada en la UNIT DSIntf. En la UNIT Provider hay este comando para garantizar que los caracteres no lo son mas que lo permitido:
Código Delphi [-]
procedure AddFieldDesc(const FldName: string; FldType, Attributes: Integer);
  var
    FldDesc: TDSDataPacketFldDesc;
  begin
    if Length(FldName) >= 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;
Pero en UNIT DSIntf hay esto:

Código Delphi [-]
MIDASNAME            = packed array [0..31] of Char; { holds a name }
Código Delphi [-]
type
  TPcktAttrArea = (fldAttrArea, pcktAttrArea);
  TPcktFldStatus = (fldIsChanged, fldIsNull, fldIsUnChanged);

  PDSDataPacketFldDesc = ^TDSDataPacketFldDesc;
  TDSDataPacketFldDesc = packed record
    szFieldName: MIDASNAME;           { Column Name }
    iFieldType: Integer;            { Column Type }
    iAttributes: Word;              { Column attributes }
  end;
Mi pregunta es: Como hago para poder permitir que si tenga valores mayores que 32? Ya cambie el Array pa:[0..60] y continua no permitinda nada mayor que 32.
Responder Con Cita