TOraDataSet.GetErrorPos returning incorrect row/col

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
mstaszew
Posts: 16
Joined: Tue 10 Feb 2009 15:04

TOraDataSet.GetErrorPos returning incorrect row/col

Post by mstaszew » Thu 14 May 2009 19:01

Hello, we are on ODAC 6.7 and Delphi 2009 with the Unicode properties enabled.

I have a query with the following SQL that references tables that do not exist. An ORA-942 error is raised.

SELECT 소다공장.소다이름 "공장", 소다음료.소다이름 "소다이름", 소다음료.소다번호 "소다 번호",소다공장.제작사자질
FROM 소다 소다음료, 소다_제작자 소다공장
WHERE 소다음료.소다_제작자_번호 = 소다공장.소다_제작자_번호
ORDER by 소다공장.소다이름, 소다음료.소다이름;

The row returned is 1 and column returned is 30 instead of the expected row:2 column:15. The correct positions are returned with a similar query using all ASCII.

SELECT tbl.a "fld1", tbl.b "fld2", tbl.c "fld3", tbl2.a "fld4", tbl2.c
from table_does_not_exist tbl, table_does_not_exist_2 tbl2 where
tbl.a = tbl2.a
order by tbl1.a, tbl2.b;

Is this an ODAC bug?

Thanks,
Michael

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Fri 15 May 2009 07:45

Oracle returns the error offset in byte count using the database character set. East Asian characters are coded by several bytes. So the offset returned by the server is bigger than then offset in characters.

ODAC cannot recalculate the offset from the database character set.

mstaszew
Posts: 16
Joined: Tue 10 Feb 2009 15:04

Post by mstaszew » Fri 15 May 2009 13:38

That explains it well. Thanks.

Post Reply