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 

Please Help with this error

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





PostPosted: Thu Aug 12, 2004 4:26 pm    Post subject: Please Help with this error 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'.

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)
order by TestDate


The object is:

object aqEffluentData: TADOQuery
Connection = acSQL
CursorType = ctStatic
MarshalOptions = moMarshalModifiedOnly
Parameters = <
item
Name = 'TestDate'
DataType = ftDateTime
Size = -1
Value = Null
end>
SQL.Strings = (
'select * from EffluentDataTestByDate(:TestDate)'
'order by TestDate')

The error stems from ado.pas with the function call
recordset.update(EmptyParam,EmptyParam)

Thanks...


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