Skip to main content
Question

Data type difference in OpenESQL between ADO and ODBC

  • July 6, 2026
  • 1 reply
  • 14 views

Peter Restorick
Forum|alt.badge.img+2

We have a number of tables in Microsoft SQL that are defined as uniqueidentifier. When accessing this column type the OpenESQL interface, using ODBC, returned this column type as a char(36).

Modifying our native code to .NET and using ADO it appears that this column type is returned as a 16 character binary column type.

My question is whether you are aware of this and whether there are other column data types that behave differently when using ADO as opposed to ODBC?

 

Peter

1 reply

Chris Glazier
Forum|alt.badge.img+4

Hi Peter,

I am not seeing the same results. 

If I have a table defined with a uniqueidentifier column with the default of NEWID()

and I insert a row and then select the row back I retrieve the converted 36 byte character string if my host variable is pic x(36) for both ODBC and ADO.

I tested with V11.0 PU6.

Can you provide more detail on where you are seeing this difference?

Thanks