Re: [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 11:24:51
|
Am 04.03.2015 11:52, schrieb Christoph Duelli:
> 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?
remark:
the idea is to finally "parse" the date into a custom date type:
like
ocilib::Date odate = rs.Get<ocilib::Date>(1);
MDate date(odate.GetYear(), odate.GetMonth(), odate.GetDay());
and to continue working with that type.
(Or is it possible to extend Resultset::Get for custom types?)
--
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.
|