📄 restructuringtables.htm
字号:
<html>
<head>
<title>Restructuring Tables</title>
</head>
<!--#include virtual="/inc/header.php"-->
<table width="100%" border="0" cellspacing="0" cellpadding="2" bgcolor="#FFFFFF">
<tr>
<td align="left">
<span style="font-family:Helvetica,Arial; font-size:12pt; color:#000000"><b>Restructuring Tables
<br>
</b></span>
</td>
<td align="right">
<font face="Arial" size="2">
<a href="transactions.htm">Previous</a>
<a href="overview.htm">Top</a>
<a href="emptyingtables.htm">Next</a>
</font>
</td>
</tr>
</table>
<br><br>
<span style="font-family:Helvetica,Arial; font-size:10pt; color:#000000">
<br>
Use Absolute Database DBManager utility (...\AbsoluteDatabase\Ultils\Bin\DBManager.exe), if you would like to change table structure manually.
<br>
<br>
To alter table from your application using TABSTable component, you could perform the following steps:
<br>
<br>
<table width="100%" border="0" cellpadding="0" cellspacing="0"><tr valign="top"><td width="28"><span style="font-family:Helvetica,Arial; font-size:10pt; color:#000000">1.</span></td><td><span style="font-family:Helvetica,Arial; font-size:10pt; color:#000000">Open existing table to fill in <a href=tabstable_restructurefielddef.htm>RestructureFieldDefs</a> and <a href=tabstable_restructureindexdef.htm>RestructureIndexDefs</a> properties.
<br>
</span></td></tr></table><table width="100%" border="0" cellpadding="0" cellspacing="0"><tr valign="top"><td width="28"><span style="font-family:Helvetica,Arial; font-size:10pt; color:#000000">2.</span></td><td><span style="font-family:Helvetica,Arial; font-size:10pt; color:#000000">Close table.
<br>
</span></td></tr></table><table width="100%" border="0" cellpadding="0" cellspacing="0"><tr valign="top"><td width="28"><span style="font-family:Helvetica,Arial; font-size:10pt; color:#000000">3.</span></td><td><span style="font-family:Helvetica,Arial; font-size:10pt; color:#000000">Modify <a href=tabstable_restructurefielddef.htm>RestructureFieldDefs</a> and <a href=tabstable_restructureindexdef.htm>RestructureIndexDefs</a> properties (add, delete or change fields and indexes descriptions)
<br>
</span></td></tr></table><table width="100%" border="0" cellpadding="0" cellspacing="0"><tr valign="top"><td width="28"><span style="font-family:Helvetica,Arial; font-size:10pt; color:#000000">4.</span></td><td><span style="font-family:Helvetica,Arial; font-size:10pt; color:#000000">Call <a href=tabstable_restructuretable.htm>RestructureTable</a> method
<br>
</span></td></tr></table><table width="100%" border="0" cellpadding="0" cellspacing="0"><tr valign="top"><td><span style="font-family:Helvetica,Arial; font-size:10pt; color:#000000"></span></td><td></td></tr></table><span style="font-family:Helvetica,Arial; font-size:10pt; color:#000000">
<br>
<b>Example:
<br>
<br>
</b></span><span style="font-family:Courier New; font-size:8pt; color:#000000"><b>var</b>
<br>
Log: <b>String</b>;
<br>
<br>
<span style="font-family:Courier New; font-size:8pt; color:#000080"><i>{set up table component}</i></span></span><span style="font-family:Courier New; font-size:8pt; color:#000000">
<br>
ABSTable1.DatabaseName := <span style="font-family:Courier New; font-size:8pt; color:#000080">'emp_db'</span></span><span style="font-family:Courier New; font-size:8pt; color:#000000">;
<br>
ABSTable1.TableName := <span style="font-family:Courier New; font-size:8pt; color:#000080">'employee'</span></span><span style="font-family:Courier New; font-size:8pt; color:#000000">;
<br>
<br>
<span style="font-family:Courier New; font-size:8pt; color:#000080"><i>{fill in restructure properties}</i></span></span><span style="font-family:Courier New; font-size:8pt; color:#000000">
<br>
ABSTable1.Open;
<br>
ABSTable1.Close;
<br>
<br>
<b>with</b> ABSTable1 <b>do</b>
<br>
<b>begin</b>
<br>
<span style="font-family:Courier New; font-size:8pt; color:#000080"><i>{specifying new table fields}</i></span></span><span style="font-family:Courier New; font-size:8pt; color:#000000">
<br>
<b>with</b> RestructureFieldDefs <b>do</b>
<br>
<b>begin</b>
<br>
Add(<span style="font-family:Courier New; font-size:8pt; color:#000080">'Hobby'</span></span><span style="font-family:Courier New; font-size:8pt; color:#000000">,aftString,<span style="font-family:Courier New; font-size:8pt; color:#000080">30</span></span><span style="font-family:Courier New; font-size:8pt; color:#000000">,False);
<br>
Add(<span style="font-family:Courier New; font-size:8pt; color:#000080">'Comment'</span></span><span style="font-family:Courier New; font-size:8pt; color:#000000">,aftMemo,<span style="font-family:Courier New; font-size:8pt; color:#000080">0</span></span><span style="font-family:Courier New; font-size:8pt; color:#000000">,False);
<br>
<b>end</b>;
<br>
<span style="font-family:Courier New; font-size:8pt; color:#000080"><i>{specifying new table indexes}</i></span></span><span style="font-family:Courier New; font-size:8pt; color:#000000">
<br>
<b>with</b> RestructureIndexDefs <b>do</b>
<br>
<b>begin</b>
<br>
Add(<span style="font-family:Courier New; font-size:8pt; color:#000080">'idxHobby'</span></span><span style="font-family:Courier New; font-size:8pt; color:#000000">,<span style="font-family:Courier New; font-size:8pt; color:#000080">'Hobby'</span></span><span style="font-family:Courier New; font-size:8pt; color:#000000">,[]);
<br>
<b>end</b>;
<br>
<span style="font-family:Courier New; font-size:8pt; color:#000080"><i>{restructure}</i></span></span><span style="font-family:Courier New; font-size:8pt; color:#000000">
<br>
<b>if</b> (RestructureTable(Log)) <b>then</b>
<br>
ShowMessage(<span style="font-family:Courier New; font-size:8pt; color:#000080">'Restructure completed'</span></span><span style="font-family:Courier New; font-size:8pt; color:#000000">)
<br>
<b>else</b>
<br>
ShowMessage(<span style="font-family:Courier New; font-size:8pt; color:#000080">'Restructure errors: '</span></span><span style="font-family:Courier New; font-size:8pt; color:#000000">+Log);
<br>
<b>end</b>;
<br>
</span><span style="font-family:Helvetica,Arial; font-size:10pt; color:#000000">
<br>
<br>
<b>Note: </b>See also how to alter table using SQL <a href=altertablestatement.htm>ALTER TABLE Command</a>.
<br>
<br>
<br>
</span></span>
<!--#include virtual="/inc/footer.php"-->
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -