On Sun, 24 Jun 2012 23:59:58 -0700 Stephen Hutton <shut...@featurecomplete.com> wrote:
SH> On Wed, Jun 20, 2012 at 3:45 AM, Vadim Zeitlin <vz-s...@zeitlins.org> wrote: SH> SH> > On Tue, 19 Jun 2012 22:44:10 -0700 Stephen Hutton < SH> > shut...@featurecomplete.com> wrote: SH> > SH> > SH> > Can use() parameters actually be modified? I hope not but I've been SH> > SH> > surprised by SOCI before... SH> > SH> SH> > SH> If recall correctly, this is for binding to stored procedure out SH> > SH> parameters. SH> > SH> > But shouldn't into() be used for "out" parameters? Perhaps this could be SH> > useful for in/out parameters but I don't even know if such thing is SH> > supported by SOCI -- is it? SH> SH> Yes, it's precisely for in/out parameter support. SH> http://soci.sourceforge.net/doc/exchange.html SH> SH> "It is still possible to provide const data for use elements. Note that SH> some database servers, like Oracle, allow PL/SQL procedures to modify their SH> in/out parameters - this is detected by the SOCI library and an error is SH> reported if the database attempts to modify the use element that holds const SH> data." Thanks, this was not at all obvious to me. I also still believe it's a pretty bad idea to allow modifying use() parameters as I think it could be unexpected to others as well. Please also notice that this definitely doesn't work neither in ODBC nor PostreSQL backends where the use() parameters are read-only and I think it doesn't work in any other ones neither. So this really looks like a leftover from SOCI Oracle origins as it's the only backend for which this is possible. And IMO it should be forbidden and, if necessary, some inout() helper similar to use() and into() should be added. But I won't change this myself. Regards, VZ
pgpDmCK4YcqWQ.pgp
Description: PGP signature
------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________ Soci-users mailing list Soci-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/soci-users