Re: Visual Basic and Oracle via a network
Date: Mon, 18 Oct 1999 19:40:31 GMT
Message-ID: <s0mttfq2r0111_at_corp.supernews.com>
If you want to know how to connect to various oracle databases, the key
to
that is in TNSNAMES.ORA. This file contains all the information needed to
connect to any Oracle Database. This file is contained in the <Oracle
Home>\network\admin (V7.3.x) or \net80 (V8.0.x) directory. The entries
will look something like this:
Example1.world =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(COMMUNITY = tcp.world)
(PROTOCOL = TCP)
(Host = Production1)
(Port = 1521)
)
)
(CONNECT_DATA = (SID = SID1)
)
)
In the "Host" variable, you can either use the host name or the TCP/IP
number (xxx.xxx.xxx.xxx).
The name that you use is on the first line. In this case you would access
'example1'.
In a VB Oracle Objects for OLE (OO4O) program the first few lines would look like this:
Set OraSession = CreateObject("OracleInProcServer.XOraSession") Set OraDatabase = OraSession.DbOpenDatabase("ExampleDb", "scott/tiger", 0&) Set OraDynaset = OraDatabase.DbCreateDynaset("select * from dept", 0&)
I hope this helps.
mblood wrote:
> > > I would like to write a program that I can use to access a large number > of databases. I know there is a way to call them by a nickname that is > used in SQL*Net but I can not seem to figure out how to connect to or > even call the database. > > Does anyone know of any resources that will get me started. > > ODBC is out of the question since I do not want to configure the ODBC > Driver for each machine for each Database. That could equal 2000 ODBC > drivers installed. > > Any one have any ideas. > > Thanks in advance > > Michael Blood > > > * Sent from RemarQ http://www.remarq.com The Internet's DiscussionNetwork *
> The fastest and easiest way to search and participate in Usenet - Free! >
-- [Quoted] Posted via CNET Help.com http://www.help.com/Received on Mon Oct 18 1999 - 21:40:31 CEST
