🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Getting DateTime Field from MSACCESS

#5733
From: Koert Wilmink
Date: Mon, 26 Feb 2001 20:07
71 lines
2760 bytes
Hi Bruce,

I received the following error:

[C++ Error] Unit1.cpp(251): E2015 Ambiguity between '_fastcall
System::TDateTime::operator =(const System::TDateTime &)' and '_fastcall
System::TDateTime::operator =(const double)'

I did try your solution too ( Try ADOQuery1->FieldByName("Dag")->AsDateTime)
, I received the next error:
[C++ Error] Unit1.cpp(251): E2288 Pointer to structure required on left side
of -> or ->*

Thanks for your help!!

Best regards

Koert Wilmink

"Bruce Lecus" <bwlecus@intrex.net> wrote in message
news:3A99B19D.6EC538D2@intrex.net...
> Koert,
>
> What is the error message?
>
> Try ADOQuery1->FieldByName("Dag")->AsDateTime
>
> Bruce.
>
> Koert Wilmink wrote:
>
> > Hi all,
> >
> > I have a MSACCESS database with a table called "Dag" with a field called
> > "Dag" with type Date.
> > I want to decode this date field, thirst I'm assigning this field to
Gdate,
> > GDate =  ADOQuery1->FieldValues["Dag"];
> >
> > The compiler is giving me an error! What is wrong ????? See the
following
> > code:
> >
> > Word GYear, GMonth, GDay;
> > TDateTime GDate;
> >
> > ADOQuery1->Close();
> > ADOQuery1->SQL->Clear();
> > ADOQuery1->SQL->Add("SELECT * ");
> > ADOQuery1->SQL->Add("FROM Dag ");
> > ADOQuery1->SQL->Add("WHERE Employee = " + QuotedStr(AnEmployee));
> > ADOQuery1->Open();
> > ADOQuery1->First();
> > while (!ADOQuery1->Eof)
> >         {
> >         GDate =  ADOQuery1->FieldValues["Dag"];
> >         DecodeDate(GDate, GYear, GMonth, GDay);
> >         if (GYear == ComboBox1->Text) {
> >                 StringGrid1->Cells[StrToInt(GMonth)-1][StrToInt(GDay)-1]
= "
> > V";
> >                 }
> >         Form1->ADOQuery1->Next();
> >         }
> > Form1->ADOQuery1->Close();
> >
> > Thanks,
> >
> > Koert Wilmink
> > Koert@Wilmink.com
>
Technical Details
Message-ID: <3a9ab7f1_2@dnews>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!bornews.borland.com!dnews!195.121.181.157
References: <3a996c8c_1@dnews> <3A99B19D.6EC538D2@intrex.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,40287e849b7aae46
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2001-02-26 12:16:02 PST
From: "Koert Wilmink" <koert@wilmink.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3a996c8c_1@dnews> <3A99B19D.6EC538D2@intrex.net>
Subject: Re: Getting DateTime Field from MSACCESS
Date: Mon, 26 Feb 2001 21:07:47 +0100
Lines: 73
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
NNTP-Posting-Host: 195.121.181.157
Message-ID: <3a9ab7f1_2@dnews>
X-Trace: 26 Feb 2001 12:09:21 -0800, 195.121.181.157
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!bornews.borland.com!dnews!195.121.181.157