[Orclib-users] selecting a "date"
Open source C and C++ library for accessing Oracle Databases
Brought to you by:
vince_del_paris
From: Christoph D. <du...@me...> - 2015-03-04 10:52:32
|
Hello everybody, What is the recommended way to select a date using the C++ API? Statement st("select sysdate from dual"); st.Execute(); Resultset rs=st.GetResultset(); ocilib::Date = rs.Get<ocilib::Date>(1); or should I do something like ocilib::ostring = rs.Get<ocilib::ostring>(1); or something entirely different? Thank you, and, Best regards @Vincent: PS: It would be nice for if Date was output streamable like (could of course be implemented more efficiently) std::ostream& operator<<(std::ostream &out, const Date &rhs) { out << rhs.ToString(); return out; } -- Christoph Duelli --------------------------------------------------------------------------------- MELOS-Medizinische Labor-Organisations-Systeme GmbH Franz-Beer-Straße 6 86459 Gessertshausen Tel.: +49 8238/9611-0 Fax: +49 8238/9611-99 mailto: in...@me... URL: www.melosgmbh.de Amtsgericht Augsburg, HRB 13226 USt-IdNr. DE 130 958 139 Geschäftsführer: Herbert Mayer, Andreas Manntz, Helmut Welsch -------------------------------------------- This e-mail (including any attachments) is confidential and may be privileged. If you have received it by mistake, please notify the sender by e-mail and delete it from your system. Any unauthorised use or dissemination of this e-mail or its contents in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change. MELOS GmbH shall not be liable for the improper or incomplete transmission of the information contained in this communication nor for any delay in its receipt. MELOS GmbH does not guarantee that the integrity of this communication has been maintained nor that this communication is free of viruses, interceptions or interference. |