Icon View Incident Report

Serious Serious
Reported By: Michael Baytalsky
Reported On: 1/13/2004
For: Version 4.00 Build 1
# 1549 Specifying Parameters on Left-Hand Side of Binary Operators Causes Type Mismatch in Filters and SQL

I have the following parametrized SQL (all works fine in v 3). Before calling ExecSQL I go through the list of parameters and
assign values. For some reason ParamCount = 2, although both parameters have the same 'OrderID'. I assign them integer 1.
I traced it, so I'm sure, that their types are both ftInteger and so is the type of OrderID field in Orders table. When I try to call ExecSQL, it gives me the following error:

11949 Type mismatch between NOT IN operator and expression 'select' in WHERE or 'JOIN' clause.

insert into OrderTotals(OrderID, TotalCharges, TotalPayment, 
select OrderID, 0, 0, 0 
from Orders 
where (OrderID = :OrderID) and 
(:OrderID not in (select OrderID from OrderTotals))

Resolution Resolution
Fixed Problem on 1/22/2004 in version 4.03 build 1