Oracle Power Object: Problem with Standalone RecordSets

From: Eric Therrien <ericth_at_montrealnet.ca>
Date: 1996/02/04
Message-ID: <ericth-0402962128470001_at_204.19.33.128>#1/1


I need some advice about this piece of code down here. I have a form (your basic "just created" form with no bound table), with two field (both are popup) one is listing all the doctor (popMedecin), the other is listing all the clinic the doctor is qualified to handle (popClinMed). To match the popClinMed field, I "build" the translation property of the popClinMed field when I modify the value of the popMedecin field with the PostChange() method, so it only happen when there's a change of doctor.

Seem like a good idea...

Unfortunately it doesn't work, for some unknow reason...

It doesn't seem to find anything (althougt there is I've check). It doesn't find any row, so it doesn't go throught the FOR loop. I "feel" like the problem is at the first line (objMedClin = NEW .... ), some how. Since the "documentation" is so good on that topic, I've lost the whole day on that problem...

I can't have the session name when in the debuger I type "objMedClin.RecordSession" (or something like that) the value show is NULL. And yes the session and the view does exist. The SQL search does find thing, I've tested it with the SQL*DBA, under Personal Oracle7, but OPO doesn't seem to find anything...

I've experimented with both pc and mac version of OPO, and with blaze and Personal Oracle7, the same thing appen. If any one have any idea at all please eMail me!!!

Here's the code for the popMedecin.PostChange() method:

>>> SUB POSTCHANGE >>>
DIM strTranslation AS String
DIM strSQLSelect AS String
DIM objMedClin AS Object

objMedClin = NEW DBRecordSet( CliniqueDataSession ) strSQLSelect = "SELECT * FROM TEST_VIEW" objMedClin.SetQuery( strSQLSelect, FALSE )

FOR x=1 TO objMedClin.GetRowCount()

   strTranslation = strTranslation & objMedClin.GetColVal( "NOM" ) & " = " & &

      objMedClin.GetColVal( "C_CLINIQUE" ) & CHR$( 13 ) & CHR$( 10 )    objMedClin.GoNxtLine()
NEXT x

popClinMed.Translation = strTranslation
popClinMed.UpdateList()

DELETE objMedClin

>>> END >>>
I'll be very happy if someone no what the heck is goiing on... Thnak's in advance for the help. Received on Sun Feb 04 1996 - 00:00:00 CET

Original text of this message