🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.intrabuilder.data.sql
1 messages
1 total messages Started by wendi Tue, 23 Dec 1997 00:00
Opening forms with/ during a while query
#26
Author: 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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads