Re: Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another
- From: "RB Smissaert" <bartsmissaert@xxxxxxxxxxxxxxxx>
- Date: Sat, 27 Oct 2021 22:58:48 +0100
Running this on Interbase 5.6
RBS
"Bob Barrows [MVP]" <reb01501@xxxxxxxxxxxxxxx> wrote in message news:exFWQ7NGIHA.3716@xxxxxxxxxxxxxxxxxxxxxxx
RB Smissaert wrote:Trying to run a parameterized query with this SQLI'm trying to reproduce this but Access refuses to run this query (operation must use updatable cursor), so I have to ask what database you are using.
UPDATE PATIENT P
SET P.REGISTRATION_START_DATE =
(SELECT MAX(P2.REGISTRATION_START_DATE)
FROM PATIENT P2
WHERE P2.PATIENT_ID IN(?, ?))
WHERE P.PATIENT_ID = ?
And running in VBA like this:
cmdADO.Execute , Array(lNewPID, lOldPID, lNewPID), adExecuteNoRecords
This gives the above error.
When I do this:
UPDATE PATIENT P
SET P.REGISTRATION_START_DATE =
(SELECT MAX(P2.REGISTRATION_START_DATE)
FROM PATIENT P2
WHERE P2.PATIENT_ID IN(?, ?))
WHERE P.PATIENT_ID = " & lNewPID
cmdADO.Execute , Array(lNewPID, lOldPID), adExecuteNoRecords
It all runs fine.
Why is there a problem with the first method?
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
.
- References:
- Prev by Date: Re: Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another
- Next by Date: Unable to persist/save ADO records
- Previous by thread: Re: Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another
- Next by thread: Unable to persist/save ADO records
- Index(es):
Relevant Pages
|