⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 restructuringtables.htm

📁 Absolute Database 5.12 src. Absolute Database lets you forget the Borland Database Engine (BDE). Th
💻 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>&nbsp;
     <a href="overview.htm">Top</a>&nbsp;
     <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.
&nbsp;<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.
&nbsp;<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)
&nbsp;<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
&nbsp;<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>
&nbsp;&nbsp;Log:&nbsp;<b>String</b>;
<br>

<br>
&nbsp;&nbsp;<span style="font-family:Courier New; font-size:8pt; color:#000080"><i>{set&nbsp;up&nbsp;table&nbsp;component}</i></span></span><span style="font-family:Courier New; font-size:8pt; color:#000000">
<br>
&nbsp;&nbsp;ABSTable1.DatabaseName&nbsp;:=&nbsp;<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>
&nbsp;&nbsp;ABSTable1.TableName&nbsp;:=&nbsp;<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>
&nbsp;&nbsp;
<br>
&nbsp;&nbsp;<span style="font-family:Courier New; font-size:8pt; color:#000080"><i>{fill&nbsp;in&nbsp;restructure&nbsp;properties}</i></span></span><span style="font-family:Courier New; font-size:8pt; color:#000000">
<br>
&nbsp;&nbsp;ABSTable1.Open;
<br>
&nbsp;&nbsp;ABSTable1.Close;
<br>

<br>
&nbsp;&nbsp;<b>with</b>&nbsp;ABSTable1&nbsp;<b>do</b>
<br>
&nbsp;&nbsp;&nbsp;<b>begin</b>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="font-family:Courier New; font-size:8pt; color:#000080"><i>{specifying&nbsp;new&nbsp;table&nbsp;fields}</i></span></span><span style="font-family:Courier New; font-size:8pt; color:#000000">
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>with</b>&nbsp;RestructureFieldDefs&nbsp;<b>do</b>
<br>
&nbsp;&nbsp;&nbsp;<b>begin</b>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>
&nbsp;&nbsp;&nbsp;&nbsp;<b>end</b>;
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="font-family:Courier New; font-size:8pt; color:#000080"><i>{specifying&nbsp;new&nbsp;table&nbsp;indexes}</i></span></span><span style="font-family:Courier New; font-size:8pt; color:#000000">
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>with</b>&nbsp;RestructureIndexDefs&nbsp;<b>do</b>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>begin</b>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>end</b>;
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<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>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>if</b>&nbsp;(RestructureTable(Log))&nbsp;<b>then</b>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ShowMessage(<span style="font-family:Courier New; font-size:8pt; color:#000080">'Restructure&nbsp;completed'</span></span><span style="font-family:Courier New; font-size:8pt; color:#000000">)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>else</b>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ShowMessage(<span style="font-family:Courier New; font-size:8pt; color:#000080">'Restructure&nbsp;errors:&nbsp;'</span></span><span style="font-family:Courier New; font-size:8pt; color:#000000">+Log);
<br>
&nbsp;&nbsp;&nbsp;<b>end</b>;
<br>
</span><span style="font-family:Helvetica,Arial; font-size:10pt; color:#000000">
<br>

<br>
<b>Note:&nbsp;&nbsp;&nbsp;</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 + -