Article View: borland.public.cppbuilder.database.ado
Article #1933Re: TADOStoredProc and datetime problem
From: Viatcheslav V. Vassiliev
Date: Sun, 14 Dec 2003 13:23
Date: Sun, 14 Dec 2003 13:23
79 lines
3685 bytes
3685 bytes
Sorry, I thought dtTimeStamp is of type TSqlTimeStamp. In this case multiplying fraction could help. //------------------------------------------ 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:3fdc2cea@newsgroups.borland.com... > 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:
<3fdc6460$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!crtntx1-snh1.gtei.net!washdc3-snh1.gtei.net!news.gtei.net!ngpeer.news.aol.com!feed2.newsreader.com!newsreader.com!newshosting.com!news-xfer1.atl.newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3fdb9267@newsgroups.borland.com> <3fdc2a9c$1@newsgroups.borland.com> <3fdc2cea@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 05:52:48 PST From: "Viatcheslav V. Vassiliev" <support@oledbdirect.com> Newsgroups: borland.public.cppbuilder.database.ado References: <3fdb9267@newsgroups.borland.com> <3fdc2a9c$1@newsgroups.borland.com> <3fdc2cea@newsgroups.borland.com> Subject: Re: TADOStoredProc and datetime problem Date: Sun, 14 Dec 2003 16:23:14 +0300 Lines: 82 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: <3fdc6460$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1071408224 213.234.218.42 (14 Dec 2003 05:23:44 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!crtntx1-snh1.gtei.net!washdc3-snh1.gtei.net!news.gtei.net!ngpeer.news.aol.com!feed2.newsreader.com!newsreader.com!newshosting.com!news-xfer1.atl.newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail