Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle Recordsets in C++

Re: Oracle Recordsets in C++

From: DeVerne Coleman <dsleuth_at_worldnet.att.net>
Date: Thu, 21 Dec 2000 02:29:11 GMT
Message-ID: <XVd06.353$Gh1.19765@bgtnsc05-news.ops.worldnet.att.net>

I have done what you want to do. I use OCI for this. It is close in syntax to ODBC/JDBC and more flexible, in my opinion, than Pro C. So, I would suggest reading the Oracle documentation on OCI. You will have to develop a recordset type class that will let you call into it with the column name as you would like. I have done this also, so it is not to hard to do.

Hope this helps.

DeVerne Coleman

Doug Farrell <dfarrell01_at_earthlink.net> wrote in message news:kga06.280$Sc1.9436_at_newsread2.prod.itd.earthlink.net...
> Hi,
>
> I'm new to using Oracle at my company and trying to develop applications
 for
> our dyanmic web sites with Oracle as the backend database. We've been
 using
> PL*SQL to develop database classes, but I find this very awkward, time
> consuming and error prone. I've seen access to Oracle using Java and the
> JDBC and a thing called a Recordset, which is kind of like code I've seen
 in
> Visual Basic too. Basically what happens is the program makes an SQL
> statement as string, and then it is passed to Oracle for evaluation. The
> results of this query is a Recordset object from which the data can be
> retrieved by 'field name' rather than explicitely, as in PL*SQL code. What
> I'm looking for is something along the lines of the following:
>
> Recordset record;
> std::string query;
>
> query = "SELECT name, number, price from items where id = '1'"
>
> db.exec(query);
>
> std::string name = record.field("name");
> std::string number = record.field("number");
> std::string price = record.field("price");
>
> The Recordset object would provide a lookup mechanism based on the field
> name. Does anyone know how to do this in Oracle using C++ code? Any
> assistance or pointers where to look would be very much appreciated.
>
> Thanks,
> Doug Farrell
>
>
Received on Wed Dec 20 2000 - 20:29:11 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US