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 

Syntax error converting datetime from character string

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (ADO)
View previous topic :: View next topic  
Author Message
Howard Carr
Guest





PostPosted: Tue Aug 10, 2004 11:11 am    Post subject: Syntax error converting datetime from character string Reply with quote



Using D5 with SQL server 2000.

I have an application that uses an updatable query on an SQL 2000 server. I
get the data ok, but when I edit and then post the data, I get the error
'Syntax error converting datetime from character string'.

Can anyone shed any light on this?


Back to top
Del Murray
Guest





PostPosted: Tue Aug 10, 2004 11:57 am    Post subject: Re: Syntax error converting datetime from character string Reply with quote



Can we see the sql statement ?


Back to top
Howard Carr
Guest





PostPosted: Tue Aug 10, 2004 2:35 pm    Post subject: Re: Syntax error converting datetime from character string Reply with quote



The SQL function is
CREATE FUNCTION EffluentDataTestByDate(@TestDate DATETIME)
RETURNS TABLE
AS RETURN
(
SELECT TestDate, Tester, AerationBasinTemp, AerationOutP, AerationOutNH3,
AerationOutN03,
......
.......
FROM PaperMillData.dbo.EffluentData
WHERE (CONVERT(VARCHAR(12),TestDate,111) =
CONVERT(VARCHAR(12),@TestDate,111))
)

The delphi ado query is:

SELECT * FROM EffluentDataTestByDate(:TestDate)


"Del Murray" <Del.Murray (AT) CreditHawk (DOT) Net.NoSpam> wrote

Quote:
Can we see the sql statement ?





Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (ADO) 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.