🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: TADOStoredProc and datetime problem

#1931
From: Viatcheslav V. Vassiliev
Date: Sun, 14 Dec 2003 09:17
44 lines
2242 bytes
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: <3fdc2a9c$1@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-mail
References: <3fdb9267@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:22:08 PST
From: "Viatcheslav V. Vassiliev" <support@oledbdirect.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3fdb9267@newsgroups.borland.com>
Subject: Re: TADOStoredProc and datetime problem
Date: Sun, 14 Dec 2003 12:17:17 +0300
Lines: 46
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: <3fdc2a9c$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1071393436 213.234.218.42 (14 Dec 2003 01:17:16 -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