vrogier / ocilib

OCILIB (C and C++ Drivers for Oracle) - Open source C and C++ library for accessing Oracle databases

Home Page:http://www.ocilib.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong precision returned if querying string is a long string.

BCSN000001 opened this issue · comments

Hi Vrogier,

On my side, I encountered a bug recently, if I use ocilib c++ api to query some data of stocks, for example, to query 4000 stocks daily data on some date, the database table key is security code and trade date, security code is varchar(20) like '000001.SZ' while trade date is number(8) like 20220325. If I just query 10 stocks data, the result is correct, i.e., the precision function of column 'trade date' returns 8 while if I query 4000 stocks one time, the precision function of column 'trade date' returns 0 instead of 8. So, is there any limit of the query string. I mean whether there is a limit length of query_str in below function.

                    ocilib::Statement st(db_inst);
		st.SetFetchMode(ocilib::Statement::FetchForward);
		st.Execute(query_str);
		ocilib::Resultset rs = st.GetResultset();

Many tks!

duplicated issue