Parameter object is improperly defined. Access vs MSSQL
- From: "Mike Meyer" <m.meyer@xxxxxxx>
- Date: Wed, 29 Jun 2005 15:04:04 +0300
Hi, I have big problem with ADO parameters.
I have tried to execute query using ADOQuery with parameters.
SELECT NULL AS Extended, Count(*) AS IntValue, NULL AS AValue
FROM Answers AS A
WHERE (A.SurveyID= :SurveyID ) AND (A.QuestionID = :QuestionID ) AND
(A.Extended <> 0)
UNION ALL
SELECT A.Extended, F.IntValue, F.TextValue as AValue
FROM Answers AS A INNER JOIN FilledSurveys AS F ON (A.SurveyID=F.SurveyID
AND A.QuestionID=F.QuestionID AND A.AnswerID=F.IntValue AND F.SessionID =
:SessionID )
WHERE (A.SurveyID= :SurveyID ) AND (A.QuestionID = :QuestionID )
Unfortunately I found what ADOQUERY parameters parser add several parameters
with same names like
:Survey
:Survey
:QuestionID
:QuestionID
:SessionID
To solve this bug I have added first line below to query
PARAMETERS SurveyID GUID, QuestionID LONG, SessionID LONG;
Now everything look fine in ADOQUery parameters property but this time I get
error from MSSQL server that PARAMETERS function is not supported.
On Access everything works fine.
Any suggestions?
Thanks for help in advance!
Mike.
.
- Follow-Ups:
- Re: Parameter object is improperly defined. Access vs MSSQL
- From: Brian Bushay TeamB
- Re: Parameter object is improperly defined. Access vs MSSQL
- From: Vitali Kalinin
- Re: Parameter object is improperly defined. Access vs MSSQL
- Prev by Date: Re: abort delete problem
- Next by Date: Update and insert in one sql statement in access error
- Previous by thread: Delphi 2005
- Next by thread: Re: Parameter object is improperly defined. Access vs MSSQL
- Index(es):