| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle Data Control Objet in VB
Thank you for your reply! As what you wrote, I replaced the statement "Set
OraDatabase = OraSession.DbOpenDatabase("ExampleDb", "scott/tiger", 0&)" with
"Set OraDatabase = OraSession.DbOpenDatabase("DEPT", "scott/tiger", 0&)" ,
that is, replaced "ExampleDb" with "DEPT" which is one name of tables
associated with "Scott", but I got the same error message as using
"ExampleDb". And I try to use the other user like PO8 and its Tables, I got
same problem. I wonder if it is because of the "Service Connecting Test Fail"
problem I encountered when I used Oracle Sevice Name Wizard.
I used Oracle Service Name Wizard as following: (1) Add new service (2) Choose "Bequeath(Local database)" (3) Use "ORCL" as Database SID (4) then I press "test service" button, input username "DEMO" , password "DEMO" (also I try other usernames like SYS, SCOTT/tiger) But the test is a failure, the error message is: Connecting.... The test did not succeed. ORA-03121: no interface driver connected - functionnot performed>> There may be an error in the fields entered or the server may not be ready for a connection. You can check the server and retry, or continue.
Is it Service Test failure that results in the failure of using Oracle Data
Control Objet in VB, or other reasons?
Please help me to figure it out. I appreciate it.
Sincerely,
Hui
In article <73gusi$fga$3_at_news02.btx.dtag.de>,
GreMa_at_t-online.de (Matthias Gresz) wrote:
> Hi,
>
> Oracle schrieb:
> >
> > Is the ODBC DNS entry for the database you are connect to is ExmapleDb or
> > others? You must first setup this up first to access the oracle database.
> > The configuration utility is in the control panel called 'ODBC Config'.
>
> I'm sorry to say that you're wrong. oo4o doesn't use ODBC. Xiaodipi
> (Where is your real name?) just has to replace 'ExampleDB' with the
> alias he has given his db using SQL*NetEasy. The example woll work when
> he ran the example creating script thus setting up user scott and the
> tables associated with this user.
>
> >
> > >I used Personal Oracle 8. I try to run the examples
> > >in directory \OraWin95\oo4o21\vb\samples\ . They are about how to use
> > Oracle
> > >Data Control Object in Visual Basic. But when I run these examples, I
> > always
> > >get an error message box which displays "Unable to make connection,
> > ORA-12154:
> > >TNS:could not resolve service name".
> > >
> > > I encoutered the same problem when I copy the following code from Oracle
> > >Objects for OLE 2.1 help file. I failed to run it, again an Error Message
> > box
> > >displayed "Unable to make connection, ORA-12154:TNS: could not resolve
> > service
> > >name" when the statement "Set OraDatabase = OraSession.DbOpenDatabase
> > >("ExampleDb", "scott/tiger", 0&) was executed.
> > >
> > >
> > >Sub Form_Load ()
> > >
> > > 'Declare variables as OLE Objects.
> > > Dim OraSession As Object
> > > Dim OraDatabase As Object
> > > Dim OraDynaset As Object
> > >
> > > 'Create the OraSession Object.
> > > Set OraSession = CreateObject("OracleInProcServer.XOraSession")
> > >
> > > 'Create the OraDatabase Object by opening a connection to Oracle.
> > > Set OraDatabase = OraSession.DbOpenDatabase("ExampleDb", "scott/tiger",
> > 0&)
> > >
> > > 'Display the username and database to which you have connected.
> > > MsgBox "Connected to " & OraDatabase.Connect & "@" &
> > OraDatabase.DatabaseName
> > >
> > >End Sub
> > >
> > >
> > >Would any one do me a favor? Thank you so much.
> > >
> > >
> > >-----------== Posted via Deja News, The Discussion Network ==----------
> > >http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
>
> --
> Matthias.Gresz_at_Privat.Post.DE
>
> Always log on the bright side of life.
> http://www.stone-dead.asn.au/movies/life-of-brian/brian-31.htm
>
>
-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Sat Nov 28 1998 - 23:57:33 CST
![]() |
![]() |