Forum > Databases

ftByte in TFieldType not exist in Lazarus. But exists in Delphi and Zeos

(1/2) > >>

Fantablup:
I had a headache with this.
Some hours doing search on ftbyte in Lazarus for TFieldType.
I ise Zeos an with stByte. And i couldn't update column with TZquery because it did not have ftByte in the parameter TFieldType. And it does not have AsByte in the parameter value.

After some hours i used Value instead of AsByte(not exists) in the parameter value.

Seems to work.

AlexTP:
You are not correct

https://github.com/graemeg/freepascal/blob/master/packages/fcl-db/src/base/db.pas#L114

line 114, ftByte exists there.

Fantablup:
I am totally correct.

Not in my Lazarus instalation.
I'm using version 2.0.12.

Absolutely nothing in the DB unit here. It does not exists here.
Strange.
Const
  Fieldtypenames : Array [TFieldType] of String[15] =
    (
      {ftUnknown} 'Unknown',
      {ftString} 'String',
      {ftSmallint} 'Smallint',
      {ftInteger} 'Integer',
      {ftWord} 'Word',
      {ftBoolean} 'Boolean',
      {ftFloat} 'Float',
      {ftCurrency} 'Currency',
      {ftBCD} 'BCD',
      {ftDate} 'Date',
      {ftTime} 'Time',
      {ftDateTime} 'DateTime',
      {ftBytes} 'Bytes',
      {ftVarBytes} 'VarBytes',
      {ftAutoInc} 'AutoInc',
      {ftBlob} 'Blob',
      {ftMemo} 'Memo',
      {ftGraphic} 'Graphic',
      {ftFmtMemo} 'FmtMemo',
      {ftParadoxOle} 'ParadoxOle',
      {ftDBaseOle} 'DBaseOle',
      {ftTypedBinary} 'TypedBinary',
      {ftCursor} 'Cursor',
      {ftFixedChar} 'FixedChar',
      {ftWideString} 'WideString',
      {ftLargeint} 'Largeint',
      {ftADT} 'ADT',
      {ftArray} 'Array',
      {ftReference} 'Reference',
      {ftDataSet} 'DataSet',
      {ftOraBlob} 'OraBlob',
      {ftOraClob} 'OraClob',
      {ftVariant} 'Variant',
      {ftInterface} 'Interface',
      {ftIDispatch} 'IDispatch',
      {ftGuid} 'Guid',
      {ftTimeStamp} 'TimeStamp',
      {ftFMTBcd} 'FMTBcd',
      {ftFixedWideChar} 'FixedWideChar',
      {ftWideMemo} 'WideMemo'
    );   

But it works with setting unknown and value on the parameter value.

Fantablup:
Ahaaaa..

My Lazarus is using FPC 3.2.0.
Latest is 3.2.2

Maybe a update is smart?

 :)

AlexTP:
Yes, last FPC added them:

ftOraTimeStamp, ftOraInterval, ftLongWord, ftShortint, ftByte, ftExtended);

Navigation

[0] Message Index

[#] Next page

Go to full version