I use a stored procedure to drop tables and views. It eliminates all the
troubles, and simplifies the code. In the files where I need to drop a
view or a table, I need only insert the command line.
CALL DropTable ("tablename here")
------------------------------------------------------------
-- DropTable.pro
SET VAR vTabName TEXT
SELECT COUNT(*) INTO vCount FROM sys_tables WHERE sys_table_name = .vTabName
IF vCount > 0 THEN
DROP TABLE &vTabName
ENDIF
RETURN
------------------------------------------------------------
Roberts, Jennifer wrote:
I am receiving I/O errors in an area of my database where I’m using
temp tables. I have one form that is using two temp tables and I have
changed the code to create the temp tables before calling the form.
However I’m still getting the I/O errors.
I am creating the tables using the following code:
SET ERROR MESSAGE 2038 OFF
DROP TABLE tselecttype
PROJECT TEMPORARY tselecttype FROM referraltypes +
USING referraltype,description WHERE LIMIT = 0
--Create temp tables for selected agencies
DROP TABLE tselectagency
PROJECT TEMPORARY tselectagency FROM agency +
USING agencykey,agency,city WHERE LIMIT = 0
SET ERROR MESSAGE 2038 ON
I receive the I/O errors on the drop table lines. After the temp
tables are created I can go into the database explorer and open the
temp tables without any problem, but if I try to design on the table I
receive the I/O errors – check for full disc… then database files are
out of sync…. then a message stating that the table has been changed,
do I want to save changes. If I click on yes here it states that
there are no columns defined and I can see that there is no table name
either.
Any ideas?
Thank you,
Jennifer Roberts
*From:* [email protected] [mailto:[email protected]] *On Behalf Of
*Rachael Malberg
*Sent:* Monday, February 01, 2010 2:36 PM
*To:* RBASE-L Mailing List
*Subject:* [RBASE-L] - Re: I/O error redux
okay so I'm on this mission to totally eliminate I/Os and Access
Violation errors from my app. I've changed code to create temp data
before calling a form or report that uses them, dropping temp tables
prior to creating them, and limiting the use of cursors. I'm not sure
why but cursors seem to be the source of most of these, anyone know
why that would be (oh and I have checked and re checked to make sure
all vars are clearly defined prior to creating the cursor)? As a
result my users have had no errors since last Thursday; as in the
words of the great philosopher Homer Simpson, 'Wooo Hooo'.
Also just wondering where and what resources are used when the
following set up is done.
compiled exe and dlls on user workstation pointing to DB files on
a server
processing a stored proceedure - is it the server where the DB is or
is it pulled over to the user workstation?
----- Original Message -----
*From:* Dennis McGrath <mailto:[email protected]>
*To:* RBASE-L Mailing List <mailto:[email protected]>
*Sent:* Friday, January 29, 2010 1:41 PM
*Subject:* [RBASE-L] - I/O error redux
I came across one place in my code which documented the problem I
was having wit temp tables.
I was inserting into an existing temp table.
The data came from a view and I was doing a group by on the
selected data coming out of the view
I frequently would get I/O errors, but not all the time.
So, I projected an empty temp table from the target table.
Then, I did the insert to the fresh new table.
Then, I appended the new table to the target table.
I haven’t had the problem since.
I hope this help someone eliminate at lease some errors.
Dennis McGrath
This electronic message contains information
from the Ohio Masonic Home,
its operating subsidaiaries or affiliates.
The information may be
confidential, privileged or otherwise
protected from disclosure.
The information is intended to be received
solely by [email protected],
for use as designated in the message. If you are not
the designated recipient, you are instructed not to review,
disclose, copy, distribute orotherwise use of
this transmission
or its contents. If you have received this
transmission in error, please notify the
Ohio Masonic Home immediately
at [email protected]; in addition,
please delete your record of
transmission. Sending, receiving, downloading, displaying,
printing material that is harassing, fraudulent, offensive,
intimidating, defamatory, or otherwise
unlawful or inappropriate is strictly prohibited by The Ohio Masonic Home.