🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

TADOStoredProc and datetime problem

#2030
From: Bo Sundahl
Date: Sat, 13 Dec 2003 22:27
23 lines
1603 bytes
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: <3fdb9267@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!news-out.visi.com!petbe.visi.com!newsfeed.news2me.com!newsfeed.wirehub.nl!news.kweb.on.ca!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,e4b10349c008757e,start
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2003-12-13 14:33:25 PST
Reply-To: "Bo Sundahl" <innovate@get2net.dk>
From: "Bo Sundahl" <innovate@get2net.dk>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: TADOStoredProc and datetime problem
Date: Sat, 13 Dec 2003 23:27:43 +0100
Lines: 30
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: <3fdb9267@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1071354471 80.62.76.214 (13 Dec 2003 14:27:51 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!news-out.visi.com!petbe.visi.com!newsfeed.news2me.com!newsfeed.wirehub.nl!news.kweb.on.ca!newsgroups.borland.com!not-for-mail