At 01:19 PM 4/11/2014, Albert Berry wrote:
Although Razzak's crew has made an astonishingly beautiful database
manager, I have managed to break it. I have an application where it
is convenient to work with a form based on a temporary table where
four contacts are linked for an easy to follow user interface.
R:Base 9.5 (64) would freeze on the command DROP TABLE tEntry and
force a close of the R:Base session.
After a few frustrating hours I thought maybe my temp table's
individual data set was problematic. I have a (probably bad) habit
of putting VARCHAR (1024) columns in a table where the users might
want to make notes. I've used VARCHAR instead of NOTE for a while,
now. In this case the column was ContactNote VARCHAR (1024). I
removed these four columns from the temp table and the problem
disappeared.
I have now just tested several runs after changing the VARCHAR
column to NOTE, and the problem did not show up. It appears that
a very wide temporary table with four VARCHAR columns in it will
not DROP properly. I'm packing up the database and sending it to
RBTI's excellent crew to see if it is me, or if it is one of those
sneaky things that happen in complicated situations.
Albert,
Great post!
All members of our eXpanded R:Dream are looking forward to seeing
your reliably replicable sample. They can't wait.
Make sure to submit everything at mailto:[email protected]. Then
just sit back, relax, and experience the R:Magic!
Having said that ...
Someone might say, why in the world would you use VARCHAR, when
you need your input data limited to 1024 characters? Do you know
the proper use of VARCHAR? <g>
Here are a few tips that you can use when determining the use of
appropriate data type, such as TEXT, NOTE, and VARCHAR in R:BASE:
01. If you know the range of your text (1 - 1500), and there is no
plan to expand, use TEXT (value) data type.
02. If going beyond 1,500 and not exceeding 4,092 characters, use
NOTE fields.
03. If going beyond 4,092 characters and having the flexibility of
variable characters and formatted text data, use VARCHAR data
type.
Please note ...
TEXT Data Type:
- Holds alphanumeric data
- The default length is eight characters; the maximum is 1,500
characters
- Unlike NOTE columns, you set the maximum length of a TEXT column
- R:BASE reserves a minimum of four bytes of internal storage space
- Indexes and constraints are allowed on TEXT data types
NOTE Data Type:
- Holds variable length text of up to 4,092 characters
- NOTE data type columns cannot be used in an expression
- The actual length of each NOTE entry is determined by the data contained
in the column; you do not set a length
- R:BASE reserves a minimum of four bytes of internal storage space
- The NOTE data type now supports a size (n). The NOTE data type will
truncate at (n) characters and give a warning
- Indexes and constraints are allowed on NOTE data types
- No length is needed
VARCHAR Data Type:
- Holds alphanumeric data
- No length is needed
- VARCHAR data is not stored in the row with the other data. It is stored
in .RB4 or .RX4 file
- VARCHAR support formatting
- Use "DB Rich Edit" or "Advanced DB Rich Edit" control in Form Designer
and "DB Rich Text" or "Advanced DB Rich Text" control in Reports Designer
to manage and reveal VARCHAR data
Very Best R:egards,
Razzak.
www.rbase.com
www.facebook.com/rbase
--
31 years of continuous innovation!
16 Years of R:BASE Technologies, Inc. making R:BASE what it is today!
--