[odb-users] calling oracle procedure with odb
Boris Kolpackov
boris at codesynthesis.com
Mon May 22 10:18:05 EDT 2023
roberto minarelli <roberto.minarelli.de at gmail.com> writes:
> #pragma db view query("CALL my_procedure(?)")
> struct my_procedure
> {
> unsigned short myvalue;
> };
>
> then in the code part I wrote
>
> struct get_freetg xtg;
> using query1=odb::query<get_freetg>;
> transaction t(db->begin());
> db->query<get_freetg>(&xtg.tg);
> t.commit();
>
> But this does not works at all
No surprise there: passing a pointer as a query parameter in the hopes
that the result will end up there is not how it works in ODB.
Take a look at an example of calling stored procedures in the manual
and see if you cannot figure it out:
https://www.codesynthesis.com/products/odb/doc/manual.xhtml#17.7
More information about the odb-users
mailing list