Re: Values of a Oracle table in C++

From: joel garry <joel-garry_at_home.com>
Date: Tue, 4 Aug 2009 09:36:53 -0700 (PDT)
Message-ID: <458dbf61-fa6d-4ae8-a220-0927d4e0799c_at_m3g2000pri.googlegroups.com>



On Aug 4, 12:21 am, ilbmbo <ilbi..._at_gmail.com> wrote:
> On 3 Ago, 22:31, TJ Bandrowsky <tbandrow..._at_treatyist.com> wrote:
>
>
>
> > On Aug 3, 6:03 am, ilbmbo <ilbi..._at_gmail.com> wrote:
>
> > > hy, i'm writing a software in c++ (Visual Studio 2008) for use a
> > > oracle database and his table.
>
> > > I used this code to select a table of my Db but i don't know how i can
> > > see the Vales of the row:
>
> > > String^ queryString = gcnew String  ("SELECT * FROM
> > > PROVA_LUCA.AFTBSKDA8");
>
> > > System::Data::OracleClient::OracleCommand^ command = gcnew
>
> > > System::Data::OracleClient::OracleCommand(queryString,conn);
>
> > >         try
> > >         {
>
> > >                 System::Data::OracleClient::OracleDataReader^ reader =
> > > command-
>
> > > >ExecuteReader();
>
> > >                 while (reader->Read())
> > >                 {
>
> > >                         "here i can using the values of any rows but i
> > > don't know the mode."
> > >                 }
>
> > > can you hepl me?
>
> > If you are writing in C++, have you looked at the OCCI C++ native
> > classes that Oracle has to use for client connectivity?  It looks to
> > me like you are using .NET as your C++ target...
>
> hy,
>
> I have all the value of my table (in Oracle Database) in the reader,
> but i can only read the value one at one (sorry for my english) with
> this command:
>
> String^ dati = gcnew String(this->ogg_textBox_errori->Text);
>
> isn't possible to create a new table with all the value of my original
> Db table????

There is a variant of the create table SQL command called CREATE TABLE AS SELECT. So if you have some sort of selection criteria, you can pass the command create table <newtablename> as select * from <oldtablename> where <various conditions>; and it will propagate the various internal definitions of the old table to the new table. Whether you have the privilege to do this, or really want to do this, is another issue.

Perhaps you can try to make more clear exactly what you are trying to accomplish?

jg

--
_at_home.com is bogus.
http://www3.signonsandiego.com/stories/2009/aug/04/1b4bofa211316-bofa-pay-sec-fine-merrill-lynch-bonu/?uniontrib
Received on Tue Aug 04 2009 - 11:36:53 CDT

Original text of this message