BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Exception

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (SQL Servers)
View previous topic :: View next topic  
Author Message
Johny
Guest





PostPosted: Tue Aug 26, 2003 9:55 pm    Post subject: Exception Reply with quote



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



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (SQL Servers) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.