Re: OpenSchema - is this possible?
- From: "Mac Davis" <newsgroups@xxxxxxxxxxxxxx>
- Date: Fri, 19 May 2006 17:56:06 -0400
Thanks Mike,
You have given me many a helpful hint and I truly appreciate it.
Regards,
Mac
"Mike Shkolnik" <mshkolnik2002@xxxxxxx> wrote in message
news:446e0fc6@xxxxxxxxxxxxxxxxxxxxxxxxx
Use the next function:
function GetFieldTypeName(AType: Integer): string;
begin
case AType of
$00000000: Result := 'adEmpty';
$00000010: Result := 'adTinyInt';
$00000002: Result := 'adSmallInt';
$00000003: Result := 'adInteger';
$00000014: Result := 'adBigInt';
$00000011: Result := 'adUnsignedTinyInt';
$00000012: Result := 'adUnsignedSmallInt';
$00000013: Result := 'adUnsignedInt';
$00000015: Result := 'adUnsignedBigInt';
$00000004: Result := 'adSingle';
$00000005: Result := 'adDouble';
$00000006: Result := 'adCurrency';
$0000000E: Result := 'adDecimal';
$00000083: Result := 'adNumeric';
$0000000B: Result := 'adBoolean';
$0000000A: Result := 'adError';
$00000084: Result := 'adUserDefined';
$0000000C: Result := 'adVariant';
$00000009: Result := 'adIDispatch';
$0000000D: Result := 'adIUnknown';
$00000048: Result := 'adGUID';
$00000007: Result := 'adDate';
$00000085: Result := 'adDBDate';
$00000086: Result := 'adDBTime';
$00000087: Result := 'adDBTimeStamp';
$00000008: Result := 'adBSTR';
$00000081: Result := 'adChar';
$000000C8: Result := 'adVarChar';
$000000C9: Result := 'adLongVarChar';
$00000082: Result := 'adWChar';
$000000CA: Result := 'adVarWChar';
$000000CB: Result := 'adLongVarWChar';
$00000080: Result := 'adBinary';
$000000CC: Result := 'adVarBinary';
$000000CD: Result := 'adLongVarBinary';
$00000088: Result := 'adChapter';
$00000040: Result := 'adFileTime';
$00000089: Result := 'adDBFileTime';
$0000008A: Result := 'adPropVariant';
$0000008B: Result := 'adVarNumeric';
else
Result := '<Unknown>';
end;
end;
--
With best regards, Mike Shkolnik
E-mail: mshkolnik@xxxxxxxxxxxxx
WEB: http://www.scalabium.com
"Mac Davis" <newsgroups@xxxxxxxxxxxxxx> wrote in message
news:446df57a$1@xxxxxxxxxxxxxxxxxxxxxxxxx
I am using OpenSchema to populate a dataset with the following statementI
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,
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
.
- References:
- OpenSchema - is this possible?
- From: Mac Davis
- Re: OpenSchema - is this possible?
- From: Mike Shkolnik
- OpenSchema - is this possible?
- Prev by Date: Re: TimeStamp field and TAdoDataSet
- Next by Date: Re: Prompt DataSource Causes CPU window to appear
- Previous by thread: Re: OpenSchema - is this possible?
- Next by thread: Prompt DataSource Causes CPU window to appear
- Index(es):
Relevant Pages
|