Parameterized Query No rows effected



I have a parameterized query of the following form

UPDATE MyTable
SET field1 = :Param1
WHERE field2 = :Param2 AND
NOT EXISTS (SELECT field21 FROM MyTable2
WHERE (field21=field1) AND (field22 <> :Param3) )

but it mysteriously does not update anything when executed.
All parameters are ftInteger, input direction, set to integer values before
ExecSql. Executed within a transaction after another query that updates
MyTable2 - could there be an issue of it not seeing these changes? Yet a
similar query with Param1, and Param3 replaced by fixed numeric values in
the SQL works perfectly (updates the records expected), as does a
non-parameterized query building the SQL text dymanically.

I just can't see what is wrong with it. Any ideas? ADO onto mdb file via Jet
4.

Dave


.



Relevant Pages

  • Re: Time out
    ... The above procedure will return a data set in one second. ... The difference in speed could be in Sql Server: The parameterized query is optimized once and then stored in the procedure cache, so that every time you send the same query, even though the values of the parameters are different, it follows the same strategy. ... On the other hand, the non-parameterized version is optimized every time, which will be a little less efficient, but will always choose the best index according to the current index statistics. ...
    (microsoft.public.dotnet.languages.csharp)
  • RE: Can I Pass Query Parameters Through SQL Statements?
    ... Suppose I have a parameterized query ... How would I structure an SQL query to call this query passing the CompanyID ... in the SQL string? ...
    (microsoft.public.access.modulesdaovba)
  • Re: escape the and " chars to insert them onto an Access database
    ... using a parameterized query, and then just set the value of the parameter to ... Syntax error in query expression ... Object& executeResult)> at System.Data.OleDb.OleDbCommand.ExecuteCommandText ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: How to fill dataset with just one row at a time?
    ... If you use a stored proc or a parameterized query, ... parameter to the SelectCommand. ... If you do not know the primary keys in which to query for a single item at a ... Can any one adivse? ...
    (microsoft.public.dotnet.academic)
  • Re: Parameterized queries with where clause including in
    ... > parameterized query using the 'in' keyword in a SELECT query and can't ... > the recordset always comes back with BOF and EOF true. ... USERID that matches the entire string, ...
    (microsoft.public.data.ado)