🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: datetime parameter in adoquery looses time part

#1042
From: Blue Knight
Date: Fri, 29 Oct 2004 10:15
18 lines
1468 bytes
Hi guys,

 >q->Active=FALSE;
 >q->SQL->Text="insert into test1 (datum) values (:a)";
 >TParameter *param=q->Parameters->FindParam("a");
 >if(param)
 >    {
 >     param->Value = TDateTime::CurrentDateTime();
 >     param->DataType=ftDateTime;
 >    q->ExecSQL();
 >    }

I haven't been following this thread, but wouldn't it make sense to set 
the data type before assigning the value?

Regards,

Bevan
Technical Details
Message-ID: <4182182c$3@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!transit.nntp.hccnet.nl!newsfeed.wirehub.nl!194.72.7.126.MISMATCH!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <411cb6bd@newsgroups.borland.com> <418207f5@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,f3f1a58d5563244b
X-Google-Attributes: gid10698b,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Fri, 29 Oct 2004 23:15:08 +1300
From: Blue Knight <bevan231X@Xhotmail.com>
User-Agent: Mozilla Thunderbird 0.6 (Windows/20040502)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.database.ado
Subject: Re: datetime parameter in adoquery looses time part
References: <411cb6bd@newsgroups.borland.com> <418207f5@newsgroups.borland.com>
In-Reply-To: <418207f5@newsgroups.borland.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 203.109.148.53
Message-ID: <4182182c$3@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1099044908 203.109.148.53 (29 Oct 2004 03:15:08 -0700)
Lines: 18
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!transit.nntp.hccnet.nl!newsfeed.wirehub.nl!194.72.7.126.MISMATCH!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail