ora-00907 Missing right parenthesis

Ben Lei

Member
I encountered this error while applying the doa 4.0.7.1 into my Delphi 6 projects.

I've set the CountAllRecords in the TOracleDataset, and it'll generate a SQL with the right parenthesis cut. It happens in the environment while the "where" clause contained chinese characters.

The original SQL and the generated SQL were as follows :
Original SQL :

select * from pisa.tbpimar_requer a
where a.requer_pnome = '中文字'
order by proc_no

Generated SQL :

select count(*) from (
select * from pisa.tbpimar_requer a
where a.requer_pnome = '中文字)
 
Please check this proceudre in OracleData.pas.

procedure SplitSelect(Select: string; KeepHints: Boolean;var BeforeWhere, WhereClause, AfterWhere, WhereWord: string);
 
Back
Top