Discussion:
[soci-users] Selecting Into an std::vector of Custom Data Types
DanForbes
2014-02-25 16:12:49 UTC
Permalink
I know that this behavior is not currently supported, but I'm curious if
someone could help me figure out what kind of changes would need to be made
in order to allow this functionality. I am far from a C++ expert, and the
error messages that I get when I try to compile code that attempts to select
into a vector of custom objects is a bit daunting.

Also, I am going to shamelessly plug my previous post
<http://soci.6940.n7.nabble.com/SQL-Server-Stored-Procedure-via-SOCI-ODBC-in-C-td3911.html>
in the hopes that someone will answer it.

Thanks!



--
View this message in context: http://soci.6940.n7.nabble.com/Selecting-Into-an-std-vector-of-Custom-Data-Types-tp3914.html
Sent from the soci-users mailing list archive at Nabble.com.
Neil Morgenstern
2014-02-26 12:45:55 UTC
Permalink
I haven't used SOCI for a couple of years but I did successfully get stored
procedures to work with ODBC on SQL Server, end of 2011, soci version 2 (I
think).

I remember that to do it I had to use statement rather than procedure.

I had to amend the backend to call SQLMoreResults in a loop.

Output parameters I think were not supported in SOCI and I handled them
direct with ODBC over which I also had a C++ layer.
Post by DanForbes
I know that this behavior is not currently supported, but I'm curious if
someone could help me figure out what kind of changes would need to be made
in order to allow this functionality. I am far from a C++ expert, and the
error messages that I get when I try to compile code that attempts to select
into a vector of custom objects is a bit daunting.
Also, I am going to shamelessly plug my previous post
<
http://soci.6940.n7.nabble.com/SQL-Server-Stored-Procedure-via-SOCI-ODBC-in-C-td3911.html
in the hopes that someone will answer it.
Thanks!
--
http://soci.6940.n7.nabble.com/Selecting-Into-an-std-vector-of-Custom-Data-Types-tp3914.html
Sent from the soci-users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
soci-users mailing list
https://lists.sourceforge.net/lists/listinfo/soci-users
DanForbes
2014-02-26 14:45:56 UTC
Permalink
Thank you for your response, Neil! I'm going to dig into the code and see if
I can get things working per your suggestions. If you have any more input
about the stored procedure problem or the problem with batch operations
using custom data types I would very much appreciate hearing them!



--
View this message in context: http://soci.6940.n7.nabble.com/Selecting-Into-an-std-vector-of-Custom-Data-Types-tp3914p3916.html
Sent from the soci-users mailing list archive at Nabble.com.

Loading...