Oracle Dynamic Tables (v$...) & VB3.0 Pro & Dynaset & ODBC

From: Maria Luisa Fernandez <mlfc_at_tid.es>
Date: 1996/08/26
Message-ID: <4vs0sc$k59_at_tid.tid.es>#1/1


Hello All!!

I've got a problem trying to monitoring the state of an external DB like Oracle from VB 3.0 Pro. The problem is :

  • I want to access from VB3.0 to the dynamic tables of Oracle (v$...) using ODBC.
  • I want to create a dynaset and show the values of the fields in a form.
  • After a short period of time, I rewrite these values into the form to reflect the changes that other users (in this case Oracle) do to the records existing in my dynaset.

I try doing by three different ways, but the records of my dynaset doesn't reflect the changes that Oracle do in these records. They have always the same value that they had when dynaset was created.

  1. First: with DB_SQLPASSTHROUGH option

   Set db=Opendatabase("ODBC....")
   Set ds=CreateDynaset("SELECT * FROM V$SYSSTAT",DB_SQLPASSTHROUGH)

   I know that using the DB_SQLPASSTHROUGH option, dynaset becomes not updatable, but I always though that this kind of dynasets don't permit add, edit or update records but reflect the changes that other users do in their records. Is this is not right what's the difference between a Snapshot and a Dynaset not updatable ?.

2) Second: without it.

   Set db=Opendatabase("ODBD...")
   Set ds=db.CreateDynaset("SELECT * FROM [V$SYSSTAT]")

   Like V$SYSSTAT is not a real table but a synonym, the dynaset becomes also not updatable.

3) Third: attaching the Table to a VB DB.   

   I attach the Table to a VB Database with the name of "STATISTIC", and then :  

   Set db=Opendatabase("c:\tmp\newdb.mdb")    Set ds=db.CreateDynaset("SELECT * FROM STATISTICS")

   But the dynaset is also not updatable and the records don't reflect the changes tha Oracle do in them.

Any suggestion would be very apreciated!!.

Thanks in advance.

                        Maria L. Received on Mon Aug 26 1996 - 00:00:00 CEST

Original text of this message