Re: Oracle Database and VB6




"weetat" <test@xxxxxxxxxxxxxx> wrote in message
news:OGsiiSckFHA.1204@xxxxxxxxxxxxxxxxxxxxxxx
> Hi Ralph ,
>
> Actually , i am not sure . Any undesired problem using ODBC to
> connect to Oracle Database ? Other ways to connect to Oracle beside ODBC ?
> I have another questions :
> Did i need to install Oracle Client in client PC so that VB6 can
> connect to Oracle DB via ODBC ? Or i just setup the ODBC data source
> name and the Oracle ODBC driver in the client PC and everything are OK ,
> similar to connectiong to Access Database .
>
> Thanks
>
> - weetat
>
>
>
> Ralph wrote:
> > "weetat" <test@xxxxxxxxxxxxxx> wrote in message
> > news:uwzKpFbkFHA.3656@xxxxxxxxxxxxxxxxxxxxxxx
> >
> >>Hi all ,
> >>
> >> I am using VB 6 in W2K SP 4 OS .
> >> Any sample code in connecting to Oracle Database in the VB 6 ?
> >> Where can i download the Oracle ODBC driver so my program can
> >>connect to the Oracle Database in my VB 6 application ?
> >>
> >>Thanks in advance.
> >>
> >>- weetat
> >
> >
> > Are you sure you want to use ODBC?
> > If so this (though a little dated) will get you started with DAO and
ODBC.
> > http://www.ilook.fsnet.co.uk/vb/vboracls.htm
> >
> > You will find drivers on your Oracle Client CD. You can download the
latest
> > Oracle drivers/providers etc, from the Oracle Support Site. Your admin
> > should be able to fetch them for you if you don't have access. There are
> > also MS versions included with the MDAC as well as some excellent 3rd
party
> > stuff ($$$$).
> >
> > If you do a Google query for sample code you should find something in
the
> > aproximately half-million results that will be returned to help you
craft
> > your solution.
> >
> > Be aware that Oracle provides a number of different access
methods/libraries
> > (ODBCDirect, ODBC, OO4O, OLE DB, ...), not all of them support the same
> > features nor will exhibit the same performance for similar features -
> > depending on data types and other factors you may want to use an
alternate
> > scheme.
> >
> > hth
> > -ralph
> >
> >
> >

You will need Oracle Client software installed on the local PC in order to
connect to an Oracle database . The reason it appears so easy to connect to
MSAccess is because the 'client' software is already install for it (Jet).

There are many layers of hardware and software between a VB program running
on a Windows box and an Oracle database (usually a Unix Box), and thus also
many pathways that can be followed from one to the other.

While each of these 'layers' support common interfaces and one can almost
mix 'n match at will, MS's view of data access and Oracle's internal guts
are so different you will run into 'Gotchas' with any particular
combination. These Gotchas are seldom fatal and there is usually a
workaround - but occasionally the workaround isn't worth it.

Oracle can only be talked to thru its own OCI API (Oracle Client Interface).
Sounds normal enough, but what is often not appreciated is this API is not
only specific to Oracle, it is specific to the programming language and
environment calling it. There is therefore in a sense more than one OCI,
more than one way for a particular ODBC or OLE DB interface to implement it.
Also don't forget it is a two-way street. One method of 'fetching' may be
superior, but the data may be returned in such a way that you end up doing
additional processing so your app can use it.

In my common experience there is no "One and Only One Way". If you work with
Oracle much, you will likely end up using several data access methods,
across suites and even in the same application. In otherwords, while there
will be an optimal solution for any one problem - there will be no universal
solution.

ODBC adds an additional layer and that effects performance, but again there
certain features only supported thru ODBC. (If you use ODBC use the MS
drivers and driver managers - not the ones from Oracle.) However, ODBC works
thru APIs and is less suitable for distributed apps. (maybe <g>)

ADO uses COM, is ideal for distributed apps, yet probably supplies less
features. Difficulty with server-side cursors is one problem. You can only
do updates using the Command Object. Until recently ('02') the MS OLE DB
provider was more stable than Oracle's. The newer Oracle OLE DB providers
appears better, but MS still creates connections faster and pools better.

OO4O (Oracle Objects for OLE) is Oracle's 'COM' object library (don't
confuse with OLE DB). It has the advantage of being able to use every
feature of Oracle including PL/SQL arrays and REF CURSORS, is a more direct
link to the OCI (fewer layers). However, it is synchronous, in-process,
doesn't support events, and you cannot use it disconnected.
(Hint: always wrap up OO4O as COM components using MTS. You get all the
features, plus the easier handling.)
(Another hint: Think of OO4O as also Oracle's ADOX.)

IMHO: Use ADO primarily and OO4O as needed. Try not to lock yourself into
any one method - layer and divided your applications to leave plenty of room
for play. Now I appreciate this will be difficult to do as this is exactly
the sort of thing pointed-hair bosses like to meddle with. Best Advice:
Don't even let them know there are choices.

Also make friends with your assigned Oracle Admin. Nod knowingly went he
rants about how ignorant Windows is. Don't argue. Practice a sad, long,
hopeful face in front of the mirror for when you need favors. Send
flowers/beer as appropriate. <g>

If your company can afford it I highly recommend Merant's drivers and
providers.
http://www.datadirect.com ($$$$) It will save you ton of trouble if peek
performance and reliablity is critical for your apps.

Also if you are going to be doing any Oracle development I highly recommend
Toad:
http://www.toadsoft.com/ ($$$$)

hth
-ralph


.



Relevant Pages

  • Microsoft ODBC for Oracle Driver problem
    ... I think I have a resource issue with this driver. ... we are having an issue where suddenly the ODBC ... customer on that hosted machine. ... Microsoft ODBC Driver for Oracle. ...
    (microsoft.public.data.odbc)
  • Re: Oracle 9i ODBC Driver for Windows XP 64 (XP 2003)
    ... One thing to try is to use the 32-bit ODBC Data Source Adminstrator. ... the Oracle driver is there. ...
    (comp.databases.oracle.server)
  • Re: Free ODBC driver for Oracle on AIX?
    ... While MS created the ODBC standard it can be used to access any ODBC ... I have used a driver from Data Direct to access a MS SQL Server ... database using the Oracle generic connectivity feature. ... tables using SQL issued in my AIX hosted Oracle database. ...
    (comp.databases.oracle.server)
  • Re: Access - Orcale - Verbindung
    ... Die Anbindung einer Applikation über ODBC an Oracle verläuft normalerweise ... Application, ODBC Driver manager, Oracle Driver, ... Insofern dürfte der ODBC Treiber allein nicht ausreichend sein. ...
    (microsoft.public.de.access)
  • Re: ODBC Trace File issue
    ... These do not have anything to do with ODBC. ... It's possible that the Oracle ... driver is writing it's own trace files. ... They appeared to be ODBC trace files but the trace ...
    (microsoft.public.data.odbc)

Loading