Entry
TSE: Database: Column: Get: How to get the columns in a database table using TSE?
Oct 30th, 2004 14:05
Knud van Eeden,
----------------------------------------------------------------------
--- Knud van Eeden --- 23 October 2004 - 04:31 pm --------------------
TSE: Database: Column: Get: How to get the columns in a database table
using TSE?
---
Steps: Overview:
1. -Mark the block containing the database table
------------------------------------------------
| A | B | C | D |
------------------------------------------------
a e e i
b f f j
c a g k
c c h l
------------------------------------------------
2. -Set a column counter to a starting value (e.g. 1)
3. -Search for last row separator "---------------...."
------------------------------------------------
| A | B | C | D |
------------------------------------------------
a e e i
b f f j
c a g k
c c h l
-here-> ------------------------------------------------
1. Store this as the end vertical position of that column
4. Search for previous row separator "---------------...."
------------------------------------------------
| A | B | C | D |
-here-> ------------------------------------------------
a e e i
b f f j
c a g k
c c h l
------------------------------------------------
1. Store this as the begin vertical position of that column
5. -Go up until "|" found at the start position of the block
------------------------------------------------
-here-> | A | B | C | D |
------------------------------------------------
a e e i
b f f j
c a g k
c c h l
------------------------------------------------
1. Store this as the begin horizontal position of that column
6. -Mark the columns one by one
1. While horizontal "|" found in that line
|
|
here
|
V
------------------------------------------------
| A | B | C | D |
------------------------------------------------
a e e i
b f f j
c a g k
c c h l
------------------------------------------------
1. Store this as the end horizontal position of that column
2. -Increase the column counter
1. Mark the rectangular block containing that column
------------------------------------------------
| A | B | C | D |
v1+------+----------------------------------------
| a | e e i
| b | f f j
| c | a g k
| c | c h l
v2+------+----------------------------------------
h1 h2
1. Do something (e.g. convert it to SQL, JavaScript,
XML, ...)
3. Let the last end horizontal end column position be the new
begin horizontal column position, to repeat the same process
for the next column
|
|
start here again for the other columns to the right
|
V
------------------------------------------------
| A | B | C | D |
------------------------------------------------
a e e i
b f f j
c a g k
c c h l
------------------------------------------------
---
---
In a similar way (by first searching for some specific row and column
separators) you can create the operations:
-count total columns
-count total rows
-get an element at position ( your row, your column )
-set an element at position ( your row, your column )
-search an element between row first an last and column first and last
-...
---
---
Internet: see also:
---
TSE: Database: Link: Overview: Can you give an overview of links?
http://www.faqts.com/knowledge_base/view.phtml/aid/32028/fid/1721
----------------------------------------------------------------------