Sorry, this entry is only available in 日本語.
Category Archives: Code
VBA: How to List Table Definitions in Access File
In this article, we will introduce code that converts a list of table definitions within Microsoft Office Access (.mdb) files into Oracle-compatible table definitions and outputs them as a list.
Overview
- We will use Excel and VBA for this process.
- By running the VBA function
GetTableDefinitions
, you can output a list of table definitions from an Access file to the open Excel sheet. - We will create text data intended to be pasted into a table definition document (.xls).
- For Access tables converted to Oracle, text columns, for example, will be displayed as
VARCHAR2
. - We won’t output system tables (you can modify the code to include them if needed).
- Link tables will display the contents of the links. The definitions of linked destination tables will not be output.
How to Use
- Open Excel.
- Open the Visual Basic Editor from the development tools.
- Add a module.
- Check Microsoft DAO in the Tools > References settings.
- Paste the code below.
- Execute the
GetTableDefinitions
function.
(日本語) ASP.NET Chart: Y軸の最大値を設定する方法
(日本語) SQL: 最初のNレコードを抽出する SELECT の書き方
How to Manipulate Field Objects in Crystal Reports
To manipulate objects in Report Designer, you may wonder how to get it done. Once you understand it, it’s a straightforward process, but getting to that point can be challenging. I tried doing it with VB.NET:
1 2 3 4 |
Dim UserReport0 As New UserReport DirectCast(UserReport0.ReportDefinition.ReportObjects("Box1"), CrystalDecisions.CrystalReports.Engine.BoxObject).FillColor = Color.Silver |
It involves some intricate work like casting (type conversion) to make properties accessible.
It seems that DirectCast is less resource-intensive than CType. You can find information about C# in the following page:
Reference: Crystal Reports
While it appears that you can’t vertically align text in the middle in Crystal Reports, this method might allow fine adjustments through the Location setting of the field.