Umm,

The program sets up an ODatabase object and then references
ODynaset objects to issue queries

e.g. assuming you have a 3 edit control login dialog box with a
class name of MYDialog. Somewhere in the InitInstance() member
for the application object you should have

#include "oracl.h"
#include "mydialog.h"

MYDialog  dlg;
ODatabase odb;
int stat;

OStartup(); // Initialize the OLE server
if(dlg.DoModal() == IDOK)  // run the connection dialog
{
  stat = odb.Open(dlg.m_CSDatabase,dlg.m_CSUser,dlg.m_CSPass);
  // check for an error and if ok then proceed to use the
  // ODatabase object in calls to open ODynaset objects or
  // execute stored procedures etc.
}


Or if you're running as a service you can stash/retrieve the
parameters in the registry through your code. The point is
that everything has to be done through YOUR code....it's just an API
Think of it as a Windows-only alternative to PRO*C. It's not
like ODBC where you setup different connections through another
tool.

Generally speaking you need to

1) create a new project workspace with Visual Studio
2) copy ORACLM.LIB from the orawin install directory
   and insert it into the project
3) copy/insert oracl.h from the oracle directory
4) make sure your project starts up OLE (AfxOleInit()) and you call
   the Oracle supplied function OStartup()
5) compile against ORACLM.LIB and run against ORACLM.DLL

Each client running your .exe must have OLE Objects installed
and the Oracle data control registered.

HTH

Jeff Herrick

On Fri, 25 Oct 2002, Thomas Day wrote:

>
> I've been reading the FM's but ...
>
> How do you set it up or change the connection?
>
> I've read a lot of nice puffery but where in the Oracle manuals will it
> tell you what need to be modified to make it work?
>
> Environment is
> Client:
> Win95
> C++ - MS Developer
> Oracle 7.3.4 client
>
> Server:
> Oracle 8.1.7 database
> Win2K
>
> Is the OLE part of the Oracle software or part of the C++?  The Fine
> Manuals seem to talk all around the actual, hands-on setting up the
> connection.  Or can someone point me to where this is covered.
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Thomas Day
>   INET: [EMAIL PROTECTED]
>
> Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
> San Diego, California        -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from).  You may
> also send the HELP command for other information (like subscribing).
>

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Jeff Herrick
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to