Click to See Complete Forum and Search --> : DSN-Less connections to Oracle DB, using RDO
Jeevan Sunkersett
April 9th, 1999, 05:42 AM
Hi,
I am trying to connect to an Oracle DB, installed on an AIX m/c, through a VB appl, from WindowsNT works. As per my documentation, we have to provide a connect string of the type:
cnstr="driver={Microsoft ODBC Driver for Oracle}; Server=XXXX; UID=XXX; pwd=xxx"
Could some one please tell me what should be entered for Server=....
Where should the name of the Oracle database, "XXX.XXX.world" (as defined in the tnsnames.ora), be specified in the conect string.
regards
Jeevan S
(PS: I would be very grateful, if some one could guide me to/ email me sample VB applications which use RDO/RDC to connect to Oracle databases. My email: "sjeevan@iname.com" )
Genie
April 9th, 1999, 04:26 PM
Hello Jeevan,
The value for server shud b the windows nt serevr name. For example, if the windows nt server name for oracle system is "Orasys" u'r connect string wud look like :
with cn
.connect = "server=orasys;driver={microsoft ODBC for Oracle};uid=XXX;pwd=XXX"
.establishconnection [rddrivernoprompt | rddriverprompt ], [<options>]
end with
Pls ensure that no spaces exist unnecessarily within the connect argument string. If u r still unsure of the oracle server try giving the option as rddrivercompleterequired. If the server is on the local machine then the value for the server can be given as "server=(local)"
u shud b able to get the connection withou any error. the user id and password, is of the login for the oracle and not of that of windows nt , of course. Do let me know if u still face any problem. ( Not that i am MR.Know-All in VB, but then, togehter v might b able to solve it!). do let me know if u succeed also !
Take care
Jay.
Ciao till i find more questions to make life more complicated......
Jeevan Sunkersett
April 12th, 1999, 12:37 AM
Genie,
Thanx for u'r advice.
However I would like to draw u'r attention to, my original post, wherein I had said that my oracle server is on an AIX m/c, not windows NT.
Anyway, I found the answer by browsing CodeGuru, in detail
It led me to a MS Kb article, Q167225, which explains the DSN-Less connections to Oracle.
For the benefit of others:
In breif, use the connect string
"UID=;PWD=;driver={Microsoft ODBC driver for Oracle}; CONNECTSTRING=myOracle.db.world"
in the en.openConnection() method of a rdoConnection variable.
As can be seen, the CONNECTSTRING=, above is the Oracle database alias, as setup in the TNSNAMES.ORA file, using SQL*Net
The VB code is
Dim cn As rdoConnection
Dim en As rdoEnvironment
cnstr = "UID=;PWD=;driver={Microsoft ODBC Driver for Oracle};" & _
"CONNECTSTRING=MyOracle.database_alias.world;"
Set en = rdoEnvironments(0)
Set cn = en.OpenConnection("", rdDriverPrompt, False, cnstr)
....
....
....
....
regards
Jeevan
April 12th, 1999, 05:48 AM
Hai
April 12th, 1999, 06:31 AM
How to use ADD-INs?
Jeevan Sunkersett
April 12th, 1999, 10:20 PM
IN the VB IDE, Add-INS, menu, click Add-IN manager.
This will open a dialog, showing all available Add-INS.
Select any and click Ok!
Now the selected Add-INs will now appear in the VB-IDE, Add-INs menu.
regards
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.