🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Exception

#2344
From: Johny
Date: Tue, 26 Aug 2003 21:55
34 lines
1658 bytes
When I try this from application:

        adodsCh->Close();
        adodsCh->CommandText="spA_GetKForCheck '" +
            IntToStr((int)year) + "." + IntToStr((int)month) + "." +
IntToStr((int)day) +
            "'"
            ;
        adodsCh->Open();

I get exception:

"The conversion of a char data type to a datetime data type resulted in an
out-of-range datetime value"

but for example if I put same call on execute it on query analyzer on SQL
server
(spA_GetKForCheck '2003.1.26')

I get good result without any error.

Why I get exception from Borland.

This is store procedure which I call:

CREATE PROCEDURE spA_GetKForCheck
(
 @sdater varchar(20)

)
AS
SELECT MAX(KID) AS KID FROM BKv WHERE (ValidFromDate < @sdater) AND
(ValidToDate > @sdater)
GO
Technical Details
Message-ID: <3f4bd822@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,b9fb99ca7799c729,start
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2003-08-26 15:02:59 PST
From: "Johny" <goky2002@beograd.com>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: Exception
Date: Tue, 26 Aug 2003 23:55:14 +0200
Lines: 38
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 213.137.121.14
Message-ID: <3f4bd822@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1061935138 213.137.121.14 (26 Aug 2003 14:58:58 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail