home *** CD-ROM | disk | FTP | other *** search
- <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
- <html>
-
- <head>
- <meta http-equiv="Content-Type"
- content="text/html; charset=iso-8859-1">
- <meta name="GENERATOR" content="Microsoft FrontPage 2.0">
- <title>Urthman's MDB Scripts</title>
- </head>
-
- <body bgcolor="#A3CDDA">
- <div align="center"><center>
-
- <table border="1" cellpadding="8" cellspacing="0" width="100%"
- bgcolor="#5A8BAB">
- <tr>
- <td align="center" width="100%"><font color="#FFFF00"
- size="6" face="Arial"><em><strong><b>Urthman's MDB
- Construction Kit.</b></strong></em></font></td>
- </tr>
- </table>
- </center></div><div align="center"><center>
-
- <table border="0" cellpadding="4" cellspacing="4" width="100%">
- <tr>
- <td align="center"><font size="5" face="Arial"><em><strong>Understanding
- MDB Script Files</strong></em></font></td>
- </tr>
- </table>
- </center></div>
-
- <p align="center"><font color="#000000" face="Arial"><strong>Quick
- methods for defining tables for your database<br>
- through importing source code snippets or scripts.</strong></font></p>
-
- <hr>
- <div align="center"><center>
-
- <table border="0" cellpadding="5" width="75%">
- <tr>
- <td align="center" width="50%"><a href="#General"><font
- face="Arial"><strong>General Information.</strong></font></a></td>
- <td align="center" width="50%"><a href="#Fixed"><font
- face="Arial"><strong>Fixed Length Records and Fillers.</strong></font></a></td>
- </tr>
- <tr>
- <td align="center" width="50%"><a href="#Formatted"><font
- face="Arial"><strong>Formatted Data and Using Arrays.</strong></font></a></td>
- <td align="center" width="50%"><a
- href="Urthman's%20MDB%20Construction%20Kit.htm"><font
- face="Arial"><strong>Main Document</strong></font></a></td>
- </tr>
- </table>
- </center></div>
-
- <hr>
-
- <p><a name="General"><font color="#000000" size="2" face="Arial"><strong>General
- Information:</strong></font></a><font color="#000000" size="2"
- face="Arial"> The Urthman's MDB Construction Kit was initially
- designed around building tables from Visual Basic source code
- snippets and evolved into something a little more sophisticated.
- The scripts can be little more than a series of Visual Basic
- variable declarations copied right from your source code and
- pasted into a text file, or they can also be simple text files
- containing record layout information.</font></p>
-
- <p><font color="#000000" size="2" face="Arial">Basically, the
- scripting only needs a variable name and data type, the size
- being optional unless you need to define fixed length fields and
- records.</font></p>
- <div align="center"><center>
-
- <table border="1" cellpadding="8" cellspacing="1"
- bgcolor="#FFFFFF">
- <tr>
- <td align="center" bgcolor="#C0C0C0"><font
- color="#800080" size="2" face="Arial"><strong>Variable
- Name</strong></font></td>
- <td align="center" bgcolor="#C0C0C0"><font
- color="#800080" size="2" face="Arial"><strong>Data Type</strong></font></td>
- <td align="center" bgcolor="#C0C0C0"><font
- color="#800080" size="2" face="Arial"><strong>Size</strong></font></td>
- </tr>
- <tr>
- <td align="center"><font color="#000080" size="2"
- face="Arial"><strong>TextVar1</strong></font></td>
- <td align="center"><font color="#000080" size="2"
- face="Arial">String</font></td>
- <td align="center"><font color="#000080" size="2"
- face="Arial">35</font></td>
- </tr>
- <tr>
- <td align="center"><font color="#000080" size="2"
- face="Arial"><strong>DoubleVar1</strong></font></td>
- <td align="center"><font color="#000080" size="2"
- face="Arial">Double</font></td>
- <td align="center"><font color="#000080" size="2"
- face="Arial">8</font></td>
- </tr>
- <tr>
- <td align="center"><font color="#000080" size="2"
- face="Arial"><strong>LongVar1</strong></font></td>
- <td align="center"><font color="#000080" size="2"
- face="Arial">Long</font></td>
- <td align="center"><font color="#000080" size="2"
- face="Arial">6</font></td>
- </tr>
- </table>
- </center></div>
-
- <p><font color="#000000" size="2" face="Arial">However, the full
- spectrum of the Visual Basic language variable declarations can
- be used, with certain mnemonics being ignored.</font></p>
- <div align="center"><center>
-
- <table border="1" cellpadding="8" cellspacing="1"
- bgcolor="#FFFFFF">
- <tr>
- <td align="center" valign="top" bgcolor="#C0C0C0"><font
- color="#800080" size="2" face="Arial"><strong>VB Variable
- Declarations</strong></font></td>
- <td align="center" valign="top" bgcolor="#C0C0C0"><font
- color="#800080" size="2" face="Arial"><strong>Meaning or
- Values</strong></font></td>
- </tr>
- <tr>
- <td valign="top"><font color="#0000A0" size="2"
- face="Arial">Dim TrueFalse As <strong>Boolean</strong></font></td>
- <td align="center" valign="top"><font color="#0000A0"
- size="2" face="Arial">True or False</font></td>
- </tr>
- <tr>
- <td valign="top"><font color="#0000A0" size="2"
- face="Arial">Dim ByteVar As <strong>Byte</strong></font></td>
- <td align="center" valign="top"><font color="#0000A0"
- size="2" face="Arial">Unsigned 8-bit value</font></td>
- </tr>
- <tr>
- <td valign="top"><font color="#0000A0" size="2"
- face="Arial">Dim Money As <strong>Currency</strong></font></td>
- <td align="center" valign="top"><font color="#0000A0"
- size="2" face="Arial">Currency values</font></td>
- </tr>
- <tr>
- <td valign="top"><font color="#0000A0" size="2"
- face="Arial">Dim Calendar As <strong>Date</strong></font></td>
- <td align="center" valign="top"><font color="#0000A0"
- size="2" face="Arial">Date and Time values</font></td>
- </tr>
- <tr>
- <td valign="top"><font color="#0000A0" size="2"
- face="Arial">Dim DoubleVar1 As <strong>Double</strong></font></td>
- <td align="center" valign="top"><font color="#0000A0"
- size="2" face="Arial">Signed double precision value</font></td>
- </tr>
- <tr>
- <td valign="top"><font color="#0000A0" size="2"
- face="Arial">Dim IntVar1 As <strong>Integer</strong></font></td>
- <td align="center" valign="top"><font color="#0000A0"
- size="2" face="Arial">Signed 16-bit value</font></td>
- </tr>
- <tr>
- <td valign="top"><font color="#0000A0" size="2"
- face="Arial">Dim LongVar As <strong>Long</strong></font></td>
- <td align="center" valign="top"><font color="#0000A0"
- size="2" face="Arial">Signed 32-bit value</font></td>
- </tr>
- <tr>
- <td valign="top"><font color="#0000A0" size="2"
- face="Arial">Dim SingleVar As <strong>Single</strong></font></td>
- <td align="center" valign="top"><font color="#0000A0"
- size="2" face="Arial">Signed single precision value</font></td>
- </tr>
- <tr>
- <td valign="top"><font color="#0000A0" size="2"
- face="Arial">Dim TextVar1 As <strong>String</strong></font></td>
- <td align="center" valign="top"><font color="#0000A0"
- size="2" face="Arial">Text or String</font></td>
- </tr>
- <tr>
- <td align="center" valign="top" bgcolor="#C0C0C0"><font
- color="#800080" size="2" face="Arial"><strong>VB
- short-hand data types</strong></font></td>
- <td align="center" valign="top" bgcolor="#C0C0C0"><font
- color="#800080" size="2" face="Arial"><strong>Meaning or
- Values</strong></font></td>
- </tr>
- <tr>
- <td valign="top"><font color="#0000A0" size="2"
- face="Arial">Dim Money<strong>@</strong></font></td>
- <td align="center" valign="top"><font color="#0000A0"
- size="2" face="Arial">Currency values</font></td>
- </tr>
- <tr>
- <td valign="top"><font color="#0000A0" size="2"
- face="Arial">Dim DoubleVar1<strong>#</strong></font></td>
- <td align="center" valign="top"><font color="#0000A0"
- size="2" face="Arial">Signed double precision value</font></td>
- </tr>
- <tr>
- <td valign="top"><font color="#0000A0" size="2"
- face="Arial">Dim IntVar1<strong>%</strong></font></td>
- <td align="center" valign="top"><font color="#0000A0"
- size="2" face="Arial">Signed 16-bit value</font></td>
- </tr>
- <tr>
- <td valign="top"><font color="#0000A0" size="2"
- face="Arial">Dim LongVar<strong>&</strong></font></td>
- <td align="center" valign="top"><font color="#0000A0"
- size="2" face="Arial">Signed 32-bit value</font></td>
- </tr>
- <tr>
- <td valign="top"><font color="#0000A0" size="2"
- face="Arial">Dim SingleVar<strong>!</strong></font></td>
- <td align="center" valign="top"><font color="#0000A0"
- size="2" face="Arial">Signed single precision value</font></td>
- </tr>
- <tr>
- <td valign="top"><font color="#0000A0" size="2"
- face="Arial">Dim TextVar1<strong>$</strong></font></td>
- <td align="center" valign="top"><font color="#0000A0"
- size="2" face="Arial">Text or String</font></td>
- </tr>
- </table>
- </center></div>
-
- <p><font size="2" face="Arial">Other data types that have been
- added to the standard Visual Basic types for the sake of
- convenience to other users familiar with other programming
- languages or who are working with record specifications in the
- form of text file documents include these:</font></p>
- <div align="center"><center>
-
- <table border="1" cellpadding="8" cellspacing="1"
- bgcolor="#FFFFFF">
- <tr>
- <td align="center" valign="top" bgcolor="#C0C0C0"><font
- color="#800080" size="2" face="Arial"><strong>Alternate
- Variable Declarations</strong></font></td>
- <td align="center" valign="top" bgcolor="#C0C0C0"><font
- color="#800080" size="2" face="Arial"><strong>Equivalent
- Meaning</strong></font></td>
- </tr>
- <tr>
- <td align="center" valign="top"><font color="#0000A0"
- size="2" face="Arial">Dim MemoVar As <strong>Memo</strong></font></td>
- <td align="center" valign="top"><font color="#0000A0"
- size="2" face="Arial">Memo field (MS Access)</font></td>
- </tr>
- <tr>
- <td align="center" valign="top"><font color="#0000A0"
- size="2" face="Arial">Dim IntVar2 As <strong>Int</strong></font></td>
- <td align="center" valign="top"><font color="#0000A0"
- size="2" face="Arial">Integer (C/C++ and others)</font></td>
- </tr>
- <tr>
- <td align="center" valign="top"><font color="#0000A0"
- size="2" face="Arial">Dim SingleVar2 As <strong>Float</strong></font></td>
- <td align="center" valign="top"><font color="#0000A0"
- size="2" face="Arial">Single Precision (C/C++)</font></td>
- </tr>
- <tr>
- <td align="center" valign="top"><font color="#0000A0"
- size="2" face="Arial">Dim TextVar2 As <strong>Text</strong></font></td>
- <td align="center" valign="top"><font color="#0000A0"
- size="2" face="Arial">Text or String (MS Access)</font></td>
- </tr>
- <tr>
- <td align="center" valign="top"><font color="#0000A0"
- size="2" face="Arial">Dim TextVar3 As <strong>Char</strong></font></td>
- <td align="center" valign="top"><font color="#0000A0"
- size="2" face="Arial">Text or String (C/C++ and others)</font></td>
- </tr>
- </table>
- </center></div>
-
- <p><font size="2" face="Arial">To take this one step further, a
- section has been provided where custom mnemonic data types can be
- defined. The two that I use most frequently are:</font></p>
- <div align="center"><center>
-
- <table border="1" cellpadding="8" cellspacing="1"
- bgcolor="#FFFFFF">
- <tr>
- <td align="center" valign="top" bgcolor="#C0C0C0"><font
- color="#800080" size="2" face="Arial"><strong>Alternate
- Variable Declarations</strong></font></td>
- <td align="center" valign="top" bgcolor="#C0C0C0"><font
- color="#800080" size="2" face="Arial"><strong>Equivalent
- Meaning</strong></font></td>
- </tr>
- <tr>
- <td align="center" valign="top"><font color="#0000A0"
- size="2" face="Arial">Dim DateVar2 As <strong>YMD</strong></font></td>
- <td align="center" valign="top"><font color="#0000A0"
- size="2" face="Arial">Date, formatted YYMMDD, fixed at 6</font></td>
- </tr>
- <tr>
- <td align="center" valign="top"><font color="#0000A0"
- size="2" face="Arial">Dim TimeVar2 As <strong>HMS</strong></font></td>
- <td align="center" valign="top"><font color="#0000A0"
- size="2" face="Arial">Time, formatted HHNNSS, fixed at 6</font></td>
- </tr>
- </table>
- </center></div>
-
- <p><a name="Formatted"><font size="2" face="Arial"><strong>Formatted</strong></font></a><font
- size="2" face="Arial"><strong>?</strong> One of the key functions
- of this program is for generating import and export code for your
- Access Database, including comma delimited formats and fixed
- field and record lengths. These two additions, that I use most
- frequently, provide a formatting short-hand for the type of
- tables that I need to create.</font></p>
-
- <p><font size="2" face="Arial">Specifying a string length (i.e., </font><font
- color="#0000A0" size="2" face="Arial">Dim StringVar As <strong>String</strong>
- *32</font><font size="2" face="Arial">) provides the program with
- fixed length field formatting information. Although not directly
- compatible with Visual Basic mnemonics, the script mechanism in
- this program also allows this same length specifier for all data
- types, permitting a fast method for defining fixed length data
- records.</font></p>
-
- <p><font size="2" face="Arial">There are a number for formatting
- options available for defining how the data looks (or should
- look) in external ASCII files. Numeric values, for example, might
- include decimal places with or without a decimal point in the
- data. Dates and time values might require specific formatting,
- including <strong>Julian dates</strong>. All of these functions
- are available in this program.</font></p>
-
- <p><font size="2" face="Arial"><strong>Defined Arrays?</strong>
- Array declarations can be used to denote multiple numbered fields
- with the same base name. Simply declare the variable name as you
- would any array variable, and the all of the fields are created
- with the numbering beginning at zero (0). For arrays with up to 9
- elements, the numbering uses a single character. For arrays up to
- 99, the numbering uses 2 characters etc. For the sake of greater
- flexibility, both the standard parenthesis and square brackets
- can be used: both (9) and [9] trigger the array. However, like
- Visual Basic, these array values must immediately follow the
- variable name.</font></p>
-
- <p><a name="Fixed"><font size="2" face="Arial"><strong>Fixed</strong></font></a><font
- size="2" face="Arial"><strong> Length Records?</strong> As noted
- above, defining the data size in the variable declarations for
- the importable code used in the creation of a table definition is
- a quick method for defining fixed field lengths. If all fields
- have a defined size, then a fixed record length can be defined.
- This also applies to filler and reserved fields.</font></p>
-
- <p><font size="2" face="Arial"><strong>Fillers and Reserved
- Fields?</strong> Field names that begin with Filler, Reserved or
- Unused are not used in the creation of the table, but are
- incorporated in the import and export file record code module. If
- you need to define a reserved field in your table, rename it with
- a functional but harmless name, and it will be used.</font></p>
-
- <p><font size="2" face="Arial"><strong>Comments?</strong> The
- comments in the code/scripts are converted to descriptions in the
- database generated by this program. This provides a convenient
- cross reference when examining the database created by the
- program and the original script text file.</font></p>
-
- <hr>
- <div align="center"><center>
-
- <table border="0" cellpadding="8" cellspacing="0" width="100%">
- <tr>
- <td align="center" width="33%"><div align="center"><center><table
- border="0" cellpadding="8" cellspacing="0"
- bgcolor="#C0C0C0">
- <tr>
- <td align="right" valign="top"><font
- color="#000000" size="1" face="Arial"><strong>Contact:</strong></font></td>
- <td valign="top"><font color="#000000" size="1"
- face="Arial"><strong>John Stanley Enterprises</strong><br>
- PO Box 1672<br>
- Valrico, FL 33595-1672</font></td>
- </tr>
- <tr>
- <td align="right" valign="top"><font size="1"
- face="Arial"><strong>URL:</strong></font></td>
- <td><a href="http://www.a-znet.com/jse/"><font
- size="1" face="Arial"><strong>http://www.a-znet.com/jse/</strong></font></a></td>
- </tr>
- <tr>
- <td align="right" valign="top"><font
- color="#000000" size="1" face="Arial"><strong>Email:</strong></font></td>
- <td valign="top"><a href="mailto:urthman@usa.net"><font
- color="#000000" size="1" face="Arial"><strong>urthman@usa.net</strong></font></a><font
- color="#000000" size="1" face="Arial"><strong> </strong></font></td>
- </tr>
- </table>
- </center></div></td>
- <td align="center" width="33%"> </td>
- <td align="center" width="33%"><font size="1"
- face="Arial">Microsoft, Windows, NT and Visual Basic are
- registered trademarks of the Microsoft Corporation.</font></td>
- </tr>
- </table>
- </center></div>
-
- <p> </p>
- </body>
- </html>
-