Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Oracle Objects for OLE: Connection Question.

Re: Oracle Objects for OLE: Connection Question.

From: Frank <frankbo_at_interaccess.nl>
Date: Tue, 24 Oct 2000 13:24:43 +0200
Message-ID: <8t3ri3$e1b$1@porthos.nl.uu.net>

One more thing: your query does not return the number of users connected - that would be:
select (count(1) - 1) from v$session where type = 'USER';

--
Frank
Barbara Kennedy <barbken_at_teleport.com> schreef in berichtnieuws
ri5J5.18126$4u4.772703_at_nntp1.onemain.com...

> Yes. Make the declarations global and don't reset the connection to
nothing
> when you are done. When the form opens up create your dynaset. When the
> timer object fires every 5 seconds do a
> dynset1.dbrefresh(). That way it will just reexecute the query and not
> reparse etc.(should be a lot faster) Otherwise you are beating the
> daylights out of the CPU on the database machine.
> Jim
> "LF" <lvflcv_at_rcn.com> wrote in message
news:8t2mr8$42g$1_at_bob.news.rcn.net...
> > Greetings All, I have a small app that consists of a single form with a
> > timer
> > objects that wakes up every 5 seconds and queries the database for the
> > number
> > of connections. Currently everything works fine, inside the timer
object
> > I have something like:
> >
> >
> > Dim OraSession As OraSession
> > Dim OraDatabase As OraDatabase
> > Dim dynSet1 As OraDynaset
> >
> > Set OraSession = CreateObject("OracleInProcServer.XOraSession")
> > Set OraDatabase = OraSession.OpenDatabase("db", "u/p", 1&)
> >
> > Set dynset1 = OraDatabase.CreateDynaset("select count(*) from
v$session",
> > ORADYN_READONLY)
> >
> > lblLbl.Caption = dynSet1.Fields(0).Value
> >
> > Set OraSession = Nothing
> > Set OraDatabase = Nothing
> >
> >
> > With what I have the connection to the database has to be made each time
> > the timer wakes up. What I woul like to do is to set the connection
string
> > one time only, say on form load, and then reference that connections
from
> > the timer. Is this possible?
> >
> > I would appreciate any help regarding this problem.
> >
> >
>
>
Received on Tue Oct 24 2000 - 06:24:43 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US