🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: datetime parameter in adoquery looses time part

#1041
From: luke.letissier
Date: Fri, 29 Oct 2004 09:05
30 lines
1665 bytes
Hi,

I have exactly the same problem. Have you found a solution?

Luke Le Tissier

> Hi all,
> 
> I'm using TADOQuery with one parameter of typ datetime for updating a
> timestamp field in database..
> When I call ExecSQL only the date part is stored in database. The time part
> is loosing .
> I've got the problem with Sybase and Oracle DB's.
> Using BCB6 and OLEDB ODBC
> ____________
> 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();
>     }
> ----------------
> Any ideas?
> 
> 

User submitted from AEWNET (http://www.aewnet.com/)
Technical Details
Message-ID: <418207f5@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <411cb6bd@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
From:     luke.letissier <luke.letissier@aew_nospam.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <411cb6bd@newsgroups.borland.com>
X-Newsreader: AspNNTP 1.50 (aewnet.com)
Subject: Re: datetime parameter in adoquery looses time part
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 63.161.67.173
Message-ID: <418207f5@newsgroups.borland.com>
Date: 29 Oct 2004 02:05:57 -0700
X-Trace: newsgroups.borland.com 1099040757 63.161.67.173 (29 Oct 2004 02:05:57 -0700)
Lines: 30
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail