Closed GoogleCodeExporter closed 8 years ago
Fixed:
function TSQLSelectObjectStatement.GetSQLWhere: string;
const
LSQL = '%s (%s = :%s)';
var
I: Integer;
LColName: string;
LParamIndex: Integer;
LParamName: string;
LItem: IMemberMeta;
begin
Result:= '';
LParamIndex:= 0;
for I:= 0 to Meta.OID.Count -1 do
begin
LItem:= Meta.OID[I];
LColName:= Driver.GetColumnName(Meta, LItem.MemberName, False);
LParamName:= Format('P%d_%s', [LParamIndex, LItem.ColumnName]);
if Result = '' then
Result:= Format(LSQL, ['WHERE' LColName, LParamName])
else
Result:= Format(LSQL, [' AND' LColName, LParamName]);
Inc(LParamIndex);
end;
end;
Original comment by cesarliws
on 12 Dec 2006 at 4:45
Original issue reported on code.google.com by
magn...@gmail.com
on 12 Dec 2006 at 1:02