🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.intrabuilder.data.sql
Article #26

Opening forms with/ during a while query

#26
From: wendi
Date: Tue, 23 Dec 1997 00:00
54 lines
2659 bytes
Hi Everyone and Happy Holidays!

We have a problem that has been troubling us -- we are using a query
with a while statement that keeps querying until there is a change in a
"status" field - when there is one condition, we want one form to open,
and when it is another condition open a different form -- also before
the while begins after the first sql we want to open a wait form letting
people know that something is going on behind the scenes this is the
code below:

sx = new Session() ;
 dx = new Database() ;
 dx.databaseName = "DATABASETEST"
 dx.session = sx
 dx.loginString = "database/database";
 dx.active = true ;
 qx = new Query() ;
 qx.database = dx
 qx.sql = "select * from RECORD where KEY2 = :key2";     
 qx.params["key2"] = TEXTUNIQUE
 qx.active = true ;
 _sys.forms.run("C:\\Program
Files\\Borland\\IntraBuilder\\APPS\\development\\wait.jfm") ;
 while (qx.rowset.fields["STATUS"].value=="G")    
      {        
       qx.active = true 
       qx.active = false
       qx.active = true
       }
       if (qx.rowset.fields["STATUS"].value=="X")
       {qx.active = false
       _sys.forms.run("C:\\Program
Files\\Borland\\IntraBuilder\\APPS\\development\\update.jfm")}
       else if (qx.rowset.fields["STATUS"].value=="E")
       {qx.active = false
       _sys.forms.run("C:\\Program
Files\\Borland\\IntraBuilder\\APPS\\development\\error.jfm")}
}

This works wonderfully in IB Explorer but not in a browser.  It seems to
be the while statement that prevents the forms from opening - without
the while, we can get the forms to appear.  The other thing is that we
know the forms are being contacted because they contain other queries in
the onServerLoad functions of these forms.  The work is being done, but
we are not actually seeing the forms.  Does anyone have any idea how to
fix or get around this - and we absolutely need the while statement. 
Ps.  The error.jfm opens when the condition is "E", but the update.jfm
does not open because it also contains a while statement that does
execute, but again, we do not see the form?  Help!  Thanks.

Happy Holidays!

Wendi
Technical Details
Message-ID: <34A048D4.4965@pipeline.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 101d9a,e290edbb631ca52b,start
X-Google-Attributes: gid101d9a,public
From: wendi <vts@pipeline.com>
Subject: Opening forms with/ during a while query
Date: 1997/12/23
Message-ID: <34A048D4.4965@pipeline.com>
X-Deja-AN: 309712919
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0
Reply-To: vts@pipeline.com
Content-Type: text/plain; charset=us-ascii
Organization: MindSpring Enterprises, Inc.
Newsgroups: borland.public.intrabuilder.data.sql