🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #1695

Re: Change default field type from TBCDField to TFMTBCDField when using dynamic fields

#1695
From: Viatcheslav V. Vassiliev
Date: Thu, 08 Apr 2004 06:44
60 lines
3478 bytes
Copy adodb.pas into your project directory and add it to the project (select
"Project\Add to project" in menu). Then make a changes you need and
recompile application. Be sure to not use adodb package (remove it from
"Project\Options\Packages\Build with runtime packages" menu/tabs or just
compile without packages at all).

//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)

"Yangkai Liu" <yangkai.liu@burkelee.com> �������/�������� � ��������
���������: news:407443af$1@newsgroups.borland.com...
>
> Thanks a lot, the first one did work.
> But on the second solution, I did find the function, changed the Pascal
code, but stuck with the dcc32 options and had no idea about subsequent
steps.  I have zero experience with Delphi, could you plesae show me how to
build my revised Pascal code to make it work?
>
>
> YangKai Liu
>
> "Viatcheslav V. Vassiliev" <support@oledbdirect.com> wrote:
> >Set TADODataSet.EnableBCD to False and your field will be mapped to
ftFloat.
> >For more options you may change ADOTypeToFieldType() procedure in ADODB
> >unit.
> >
> >//------------------------------------------
> >Regards,
> >Vassiliev V. V.
> >http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
> >ADO.Net
> >http://www.oledbdirect.com - The fastest way to access MS SQL Server,
> >MS Jet (Access) and Interbase (through OLEDB)
> >
> >"Yangkai Liu" <yangkai.liu@burkelee.com> ������?�������� ?��������
> >��������? news:40737e76$1@newsgroups.borland.com...
> >>
> >> Hi,
> >>
> >> I am writing console program which can access MS SQL server and I need
> >precision more than 4 digits after the decimal point.  The database field
> >type is decimal and there is no way for me to change that.  The dynamic
> >field generated has type TBCDField, which has only 4 digits precision
after
> >the decimal point.  According to document, there is no way to change data
> >type for a dynamic field.  Is there any way to make the default data type
to
> >be TFMTBCDField? Or is there any better soulution?
> >>
> >>
> >> YangKai Liu
> >
> >
>
Technical Details
Message-ID: <4074f4c5$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <40737e76$1@newsgroups.borland.com> <4073a5d4$1@newsgroups.borland.com> <407443af$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 10698b,894c32b4470ce710
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2004-04-08 00:09:31 PST
From: "Viatcheslav V. Vassiliev" <support@oledbdirect.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <40737e76$1@newsgroups.borland.com> <4073a5d4$1@newsgroups.borland.com> <407443af$1@newsgroups.borland.com>
Subject: Re: Change default field type from TBCDField to TFMTBCDField when using dynamic fields
Date: Thu, 8 Apr 2004 10:44:15 +0400
Lines: 62
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 213.234.218.42
Message-ID: <4074f4c5$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1081406661 213.234.218.42 (7 Apr 2004 23:44:21 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail