DBF: extended type: SET 'Y', but GET 'I'

69 views
Skip to first unread message

Hurricane

unread,
Sep 19, 2025, 10:15:58 AM (11 days ago) Sep 19
to Harbour Developers
Hi,


// DBF: extended type: SET 'Y', but GET 'I'
function main
   CLS

   DBCREATE( 'TESTY', { ;
      {'CODE', 'N', 5, 0},;
      {'NAME', 'C', 30, 0},;
      {'PRICE', 'Y', 8, 4} }, NIL, .T., 'TESTY' )

   ? FieldType('PRICE')  // OK
   ? FieldLen('PRICE')   // OK
   ? FieldDec('PRICE')   // OK

   dbCloseAll()

   USE TESTY
   ? FieldType('PRICE')  // INCORRECT
   ? FieldLen('PRICE')   // OK
   ? FieldDec('PRICE')   // OK

   RETURN NIL

Initially without any consequences for storage and reading, but it certainly interferes with specific logic, structure updates, etc.


In this utility dbu (structure mode), I added support for all Harbour extended types. In structure mode, I detect the situation and set it to type Y.

Regards,
Hurricane
Reply all
Reply to author
Forward
0 new messages