OpenSchema - is this possible?



I am using OpenSchema to populate a dataset with the following statement

dm.conn.openschema (siColumns, EmptyParam, EmptyParam,dm.adoDataset1);

This works fine except that it returns DATA_TYPE as a numeric value.

First question. Is there a list somewhere of these datatypes and their
corresponding integer value?

Second question. Since a numeric result for the datatype makes no sense, I
want to create a calculated field to return the same text as Enterprise
manager does. Is it possible to use a calculated field in this case and
display a string for the datatype?

I say

dm.adodataset1.fielddefs.add ('DTYPE', ftString, 12, FALSE);
dm.adodataset1.fieldbyname ('DTYPE').calcuated := TRUE;

dm.adodataset1.asutcalcfields is set to true.

However, I then receive a runtime error ADODataSet1: Field 'Dtype' not
found.

Thanks,

Regards,

Mac


.



Relevant Pages

  • Re: OpenSchema - is this possible?
    ... function GetFieldTypeName: string; ... First question. ... Since a numeric result for the datatype makes no sense, ... Is it possible to use a calculated field in this case and ...
    (borland.public.delphi.database.ado)
  • Re: OpenSchema - is this possible?
    ... function GetFieldTypeName: string; ... First question. ... Since a numeric result for the datatype makes no sense, ... Is it possible to use a calculated field in this case and ...
    (borland.public.delphi.database.ado)