OCTETS as GUID

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
upscene
Posts: 280
Joined: Thu 19 Oct 2006 08:13

OCTETS as GUID

Post by upscene » Fri 06 Oct 2017 07:38

Hi,

Is it possible to map CHAR(16?) OCTETS to a GUID string? If so, how?

Mind you, I have no knowledge over the field name. Can this be done using the data type map rules? If so, how, I haven't been able to figure it out?

With regards,

Martijn Tonies

ViktorV
Devart Team
Posts: 2780
Joined: Wed 30 Jul 2014 07:16

Re: OCTETS as GUID

Post by ViktorV » Fri 06 Oct 2017 09:09

To solve the task, you can use the following mapping rule:

Code: Select all

  IBCQuery.DataTypeMap.AddDBTypeRule(ibcCharBin, 16, 16, ftGuid);
Note that to run this code, you should add the IBCDataTypeMap unit to the USES clause of your unit.

Post Reply