Re: Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another
- From: "Bob Barrows [MVP]" <reb01501@xxxxxxxxxxxxxxx>
- Date: Sat, 27 Oct 2007 17:17:57 -0400
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
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?
must use updatable cursor), so I have to ask what database you are using.
--
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"
.
- Follow-Ups:
- References:
- Prev by Date: Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another
- Next by Date: Re: Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another
- Previous by thread: Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another
- Next by thread: Re: Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another
- Index(es):
Relevant Pages
|
|