Article View: borland.public.cppbuilder.database.ado
Article #1932Re: TADOStoredProc and datetime problem
From: Bo Sundahl
Date: Sun, 14 Dec 2003 09:26
Date: Sun, 14 Dec 2003 09:26
62 lines
2737 bytes
2737 bytes
Thanks for the answer, but I'am not sure I understand what you are proposing... I have a TDateTime variable. How can I mulitiply the millisec part with 1000000 without changing the complete timestamp ? Regards Bo "Viatcheslav V. Vassiliev" <support@oledbdirect.com> wrote in message news:3fdc2a9c$1@newsgroups.borland.com... > Borland timesmap structure and Microsoft timestamp structure are different. > Where there are milliseconds in Borland, 1*10^-9 sec. in Microsoft. So try > to just multiply milliseconds by 1 000 000. > > //------------------------------------------ > Regards, > Vassiliev V. V. > http://www.managed-vcl.com - using .Net objects in Delphi + ADO.Net > http://www.oledbdirect.com - The fastest way to access MS SQL Server, > MS Jet (Access) and Interbase (through OLEDB) > > "Bo Sundahl" <innovate@get2net.dk> �������/�������� � �������� ���������: > news:3fdb9267@newsgroups.borland.com... > > Hi > > > > I'am using BCB6 TADOStoredProc with a MS SQL Server 2000 database and have > a > > problem with the millisec part of the datatime value. > > > > In the SQL Server 2000 I have like > > > > CREATE PROCEDURE TEST_ADD > > @P_TIMESTAMP datetime > > AS > > insert into nancy.TEST values( @P_TIMESTAMP) > > > > In BCB6 I do > > pSPData->ADOStoredProcAdd->Parameters->Items[0]->Value = dtTimestamp; > > where dtTimestamp is a TDateTime with milliseconds. > > > > The data stored in the SQL server database is round to nearest second > > although it do support milliseconds, i.e. "2003-12-12 12:23:44:000" > > > > Anyone having any idear where this goes wrong ?? > > > > Thanks in advance > > Bo Sundahl > > > > > > > > > > > > > > > >
Technical Details
Message-ID:
<3fdc2cea@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3fdb9267@newsgroups.borland.com> <3fdc2a9c$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 10698b,e4b10349c008757e X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2003-12-14 01:51:59 PST Reply-To: "Bo Sundahl" <innovate@get2net.dk> From: "Bo Sundahl" <innovate@get2net.dk> Newsgroups: borland.public.cppbuilder.database.ado References: <3fdb9267@newsgroups.borland.com> <3fdc2a9c$1@newsgroups.borland.com> Subject: Re: TADOStoredProc and datetime problem Date: Sun, 14 Dec 2003 10:26:55 +0100 Lines: 64 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: 80.62.76.214 Message-ID: <3fdc2cea@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1071394026 80.62.76.214 (14 Dec 2003 01:27:06 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail