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 -> Oracle Recordsets in C++

Oracle Recordsets in C++

From: Doug Farrell <dfarrell01_at_earthlink.net>
Date: Wed, 20 Dec 2000 22:20:00 GMT
Message-ID: <kga06.280$Sc1.9436@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 - 16:20:00 CST

Original text of this message

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