PPO C/C++ question (strange problem with embed sql)
Date: Thu, 21 Feb 2002 16:23:11 +0100
Message-ID: <a5339o$pu$02$1_at_news.t-online.com>
[Quoted] Hi Developers,
I'm trying to achieve some dynamic flexiblity with Oracle C++
precompiler. I want the following :
excute 'select * from table where key in (1,2...,n) and key2 = :VarKey'
I try to solve it this way..Wrote cursor open function like this :
Exec sql excute
Open :MyCursor for select * from table where key in (1) and key2 = :VarKey'
end;
end-exec;
precompiled it into .cpp file and looked at this section. Precompiler
generated me block of code for this expression.
I copied it from { to } and pasted into .cxx file (file before precompiler)
and commented out embed sql expression,
then compiled file, started and ....it crashed. My goal was to change
sqlstm.stmt expression to some dynamic stuff in IN () section ,becouse it
could not be done with embed sql . However by some very strange reason this
trick didnt work. ... Maybe someone already tried solve it ? Google groups
dont want to accept 'where' 'in' into query :)
so , i cant search groups with exact match :) But i did try to find a
problem all day ! :)
And i know about dynamic sql, but i thought that this way would be easier
and this is almost the same.
-- [Quoted] Best regards, Andrey KoubychevReceived on Thu Feb 21 2002 - 16:23:11 CET