Karen,
This approach has been available for long time. This is what used to do to
display a new selection:
-- On Before Start, selects all records:
SET ERROR MESSAGE 677 OFF
DROP VIEW x_feat
SET ERROR MESSAGE 677 ON
CREATE TEMPORARY VIEW x_feat AS SELECT +
sub_sys,seg_id,road_name AS xroad_name FROM features
RETURN
During form execution I would close the table, drop the view, recreate the view
with the new condition and open the view again, all from within the form.
-- This code executed after a new selection criteria was entered inside the form
PROPERTY TABLE x_feat 'CLOSE'
SET ERROR MESSAGE 677 OFF
DROP VIEW x_feat
SET ERROR MESSAGE 677 ON
SET VAR vDefineView = ('CREATE TEMPORARY VIEW x_feat AS SELECT')
SET VAR vDefineView = +
(.vDefineView & 'sub_sys,seg_id,road_name AS xroad_name' +
& 'FROM features WHERE sub_sys LIKE' &.vsub_sys_search +
& 'ORDER BY sub_sys ASC, seg_id ASC' )
&vDefineView
PROPERTY TABLE x_feat 'OPEN'
Worked like charm. Now, I just use Enhanced Grids and enter the new selection
criteria at the top and no longer need all the code above. I love Enhanced
Grids, they make life a lot simpler.
Javier,
Javier Valencia, PE
O: 913-829-0888
H: 913-397-9605
C: 913-915-3137
From: [email protected] [mailto:[email protected]] On Behalf Of Karen Tellef
Sent: Thursday, January 02, 2014 12:43 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: TEMP TABLE
I do the same (putting temp table/view definitions on the Before Design and
Before Start), but
I've never dropped one on the "on close". I wasn't sure if that means before
the form closes
or after the form closes. I assumed it couldn't be the latter, and to me it
just doesn't seem
smart to drop the table that a form is based on while you're still in it.
Karen
-----Original Message-----
From: Javier Valencia <[email protected]>
To: RBASE-L Mailing List <[email protected]>
Sent: Thu, Jan 2, 2014 11:59 am
Subject: [RBASE-L] - Re: TEMP TABLE
Karen,
I now routinely create the temporary table(s) or view the form uses from within
the form.
You can place the code to create the temporary table/view in:
On Before Design Action
So you can actually work on/edit the form, and then also place the code in:
Before Start EEP
Which actually creates the temporary table/view at execution time; I also drop
the Temporary Table/View in:
On Close EEP.
BTW, before I create a Temporary Table/View, I always drop the Table/View
first, even if it does not exist.
Don’t forget that if you want to access the form in the EDIT mode, the
temporary Table/View must have at least one row and cannot be empty.
All the code required to create the temporary table(s), run the form and drop
the temporary tables is contained in the form.
This approach simplifies things quite a bit, such as when you need to update
the form, you just upload the one modified form and don’t have to also upload
the forms that create and drop the temporary table(s/view.
All the new forms I design that use temporary Tables/Vies now use this approach.
Javier,
Javier Valencia, PE
O: 913-829-0888
H: 913-397-9605
C: 913-915-3137
From: [email protected] [mailto:[email protected] <mailto:[email protected]?> ]
On Behalf Of Karen Tellef
Sent: Thursday, January 02, 2014 9:44 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: TEMP TABLE
I've never tried to drop a temp table that a form is based on while I am still
in that form. Is that what you're doing? If so, can you do this?
The eep from FormA:
edit using FormB
drop table <temptable>
Karen
-----Original Message-----
From: Jim Belisle <[email protected]>
To: RBASE-L Mailing List <[email protected]>
Sent: Thu, Jan 2, 2014 9:23 am
Subject: [RBASE-L] - RE: TEMP TABLE
I have done that. All code works as planned until I come to the last
lines that DROP the table.
I then get the error message even though I have that message off.
James Belisle
Making Information Systems People Friendly Since 1990
-----Original Message-----
From: [email protected] [mailto:[email protected] <mailto:[email protected]?> ]
On Behalf Of Buddy
Walker
Sent: Thursday, January 02, 2014 9:16 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: TEMP TABLE
Can you put a "Trace ON' just before calling the form and bit button to
step through to see what is happening?
-----Original Message-----
From: [email protected] [mailto:[email protected] <mailto:[email protected]?> ]
On Behalf Of Jim
Belisle
Sent: Thursday, January 02, 2014 10:12 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: TEMP TABLE
No disconnect. This is a form within my application.
I am just using the CLOSEWINDOW code to get back to the main menu.
James Belisle
Making Information Systems People Friendly Since 1990
-----Original Message-----
From: [email protected] [mailto:[email protected] <mailto:[email protected]?> ]
On Behalf Of Buddy
Walker
Sent: Thursday, January 02, 2014 9:07 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: TEMP TABLE
Jim
Do you disconnect or re-connect to the database in your code is so
that could be causing your temp table dropping.
Buddy
-----Original Message-----
From: [email protected] [mailto:[email protected] <mailto:[email protected]?> ]
On Behalf Of Jim
Belisle
Sent: Thursday, January 02, 2014 9:57 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - TEMP TABLE
I am working with two forms where one form comes (form A) up then when I
am finished with form A I close the form and bring up form B. When done
working in form B I hit a bit button that closes the window and performs
other code.
Here is my problem. Form B is based on a temp table and the very last
code in the bit button when closing this form is to DROP the temp table.
I set the error message 2038 off and the temp table updates the regular
tables per the code.
However I continue to get the error message 2038 stating the temp table
is not defined.
Another aspect to this is that this happens ONLY after adding rows to
another temp table through a DBGrid on Form B.
The error codes do not appear when adding the row. Just when the code
runs through the Bit Button.
Any suggestions?
James Belisle
Making Information Systems People Friendly Since 1990