On Mon, 7 May 2012 20:27:58 +0100 Neil Morgenstern <neil.morgenstern.2...@gmail.com> wrote:
NM> They wouldn't be static variables they would be class member variables, so NM> in your case members of MyClass. It's true but in my case MyClass is a singleton so there is no essential difference between using static/global or member variables. The main problem is that I still need to keep all these extra variables and write code copying data to/from them instead of using the real data directly. It would be really much better if I could keep a prepared statement but just rebind the variables used in it. I know that it's not impossible to implement this as (SOCI-inspired, AFAICS) cppdb library does allow it, see the last example at http://cppcms.com/sql/cppdb/stat.html, but I don't see how to do it with SOCI yet... I wonder if I'm really the first person to be trying to do this? If so, why? Am I perhaps missing something and it's simply not worth trying to cache the prepared statements (e.g. because database keeps such cache internally anyhow)? NM> If you really are doing this a lot and want to optimise, consider using the NM> vector option. I can't do this, the values are read one by one and more or less unpredictably. I was just trying to save on the statement preparation here but, again, perhaps it's not really even worth doing it. I still find it strange if it's really not supported, I was hoping that I was just missing the right way to do it. Regards, VZ
pgp0RDH4Arlou.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