Possible values for _field._data-type?

Posted by ChUIMonster on 02-Apr-2020 16:57

I was looking at _dbParams and noticed that the possible values for the _dbParams-dtype field aren't documented.  Even though they are fairly obvious to decode that got me curious.  So I ran this (against sports2000 on oe12.0)

for each _field no-lock break by _dtype:
  if first-of( _dtype ) then
  display _dtype _data-type format "x(30)" with no-box.
end.

_dtype Data-Type
────── ──────────────────────────────
1 character
2 date
3 logical
4 integer
5 decimal
7 recid
8 raw
18 blob
19 clob
22 short
24 float
25 double
31 fixchar
32 bigint
33 time
34 timestamp
40 datetime-tz
41 int64

There are quite a few gaps in the numbering.  Is there a more complete list hiding somewhere?

 

All Replies

Posted by Matt Baker on 02-Apr-2020 19:32

The types listed there share values with r-code and runtime.  So you won't find things like COM-HANDLE in the database, but it is used in the runtime.  Hence the gaps in you list: simply won't find them using that technique.  Some of them built-in widgets have their own numbers and those won't show up either.  Some are placeholder values that are not used, and some are specific to .NET data types that don't show up in the ABL except for .NET bridge work. there is one for LONG for the ABL that is used for calls and return values for .dll entry points.

rowid = 13

Some of them only apply to database fields that are SQL specific datatypes,  you won't find in a basic sports database.

byte = 21

long = 23

unsigned short = 26

unsigned byte = 27

fixed raw = 35

unsigned long = 43

unsigned int = 44

This thread is closed