Memos (TMemoField) are written to separate files and are accessed from within the table by a link and/or or mapped image.
Line-feeds (10d) within the memo are interpreted as the end of the current paragraph.
File name's extension is .HTM
We heard, that still some people work with operating systems that require old-style file names (like DOS and NetWare), so we are forced to use 8-character filenames. This causes some general output restrictions.
An existing memo for a record and/or table-row will be marked with a picture (default is Attach.jpg), otherwise (if there is no memo) a simple hyphen appears.
The memo-files are located in the specified ExportDir.
Like memos, graphics (stored in a TBlobField or a TGraphicField) are written to separate files while exporting, with the extension .JPG, though.
To be INet- and/or browser-compatible, graphics will be converted to JPEG-format.
File naming conventions, location and access from within the table is equal to memos, except that the default image for a JPEG is Image.jpg instead of Attach.jpg.
Import notice:
There are some limits and restrictions with respect to graphics:
Since xBase-tables and most of ODBC-sources do not provide specialized graphic-BLOBs, both of the field types TGraphicField and TBlobField are assumed containing graphical information.
If you intent to store picture formats different from BMP to the BLOB, you should add an alphanumeric field named GRFORMAT (3 digits) to the database in order to enable TDB2Web to recognize the format of the graphic stored in the BLOB.
The field's content should be the file extension of the image, f.e. JPG for JPEGs, PCX for ZSoft pixels, etc. The field-entries are not case sensitive.
By default TDB2Web assumes the BMP-format. If it is not, you will encouter an error.
Format | Color mode | Supported |
---|---|---|
BMP | True color (RGB) | Yes |
BMP | Indexed color | Yes |
JPEG | True color (RGB) | Yes |
GIF | Indexed color | (Yes; see note below) |
PCX | True color (RGB) | Yes |
PCX | Indexed color | Yes |
TGA | True color (RGB) | Yes |
TGA | Indexed color | No |
TIFF | in general | No |
Remarks:
We could not test the Windows MetaFiles (WMF / EMF). If you did, please let us know the result.
Obviously GIF-files must have a minimum size of about 100 x 100 pixels. We encountered an error if they are smaller.
Float fields
- If a DisplayFormat is given, float fields are displayed using this format.
- Otherwise the number is displayed including thousands-separator with two decimals.
Currency fields
Currency fields are converted using the FormatToStrF-function with two decimals.
Other
All other numeric types appear simply as is.
Main purpose of the columns definition dialogue is defining the contents of the output table.
The content (i.e. the selected fields along with their properties) is stored in a file which name bases on the dataset's name to which it belongs to. The name of this file is automatically set and expected when entering this dialogue, so do not rename it!
Important: In difference to the exported files this file is expected to be a local one and therefore has no DOS-restrictions!
Usage
Simply select one of the Available Fields and drag it to the Currently selected-grid. The newly placed field will appear on the right side of the grid.
Within the grid you can move the columns as usual to any position you like.
You remove a column by pressing [Ctrl]+[Del]. Alternatively you can click on the right mouse button and see what happens.
To access the attributes just click on either a grid's column or one of the Available fields.
Setup available fields
The Available fields list shows all available fields of the given dataset.
The meaning of available depends on the given datasource:
If the datasource is a TDBGrid, all fields are listed that are currently visible in the grid, i.e. all fields that you had specified in the grid's columns editor. You see the specified grid-column-captions.
Otherwise you see the DisplayLabels of all fields whose Visible-state is set to True.
Alter the definition file
As mentioned above, the currently selected columns (as they are in the Currently selected-grid) are stored along with their properties in a file. The file's name equals the dataset's name plus the extension .CDF and is placed in the home directory of the application.
It is a plain ASCII-file. So, if you do not want the user to change the selection you have the chance to alter and/or prepare it with any text editor.
Warning: The parser seems to work fine, you should be careful, though!
Since this file is an SGML-based document it requires some rules. These rules are embedded in the program and cannot be modified.
Valuable elements
Element State Remark DATASET Required Must be first element
Attribute required: NAME, Value: Name of the datasetCOLUMN Required Must follow DATASET-element FIELDNAME Required Must follow COLUMN-element HALIGN Optional - VALIGN Optional - HEADER Optional - ANCHORNAME Optional - WRAP Optional If set, must be last element Switching the optional elements may produce unpredictable results.
This is a short example of how a Column Definition File looks like:
<!DOCTYPE ColumnDefinitionFile SYSTEM> <!-- Creator: _dbp_test --> <!-- Creation date: 01.08.97 10:07:15 --> <!-- This is an automatically generated file. It will be read and overwritten. Do Not Edit! --> <DATASET NAME=Table1> <-- Required --> <COLUMN> <-- Required --> <FIELDNAME>Species No</FIELDNAME> <-- Required --> <HALIGN>Right</HALIGN> <-- Implied --> <VALIGN>Top</VALIGN> <-- Implied --> <HEADER>Species No</HEADER> <-- Implied --> <ANCHORNAME>mailto</ANCHORNAME> <-- Implied --> <WRAP>NOWRAP</WRAP> <-- Implied --> </COLUMN> <-- Required --> </DATASET> <-- Required -->
The main output file along with all attached files is stored in the specified output directory.
By default the name of the main output file bases on the table's name and has the extension .HTM.
If the file name has more than eight characters, it will simply be cut off!
- If the datasource is a local table (dBase or Paradox), the file name equals the table's DOS-name.
- If the datasource is an SQL-table, the file name is retrieved from the SELECT-statement.
See also desccription of OutputFile property
So, you might get in trouble with overwritten files.In consequence of the file-naming-restrictions of operating systems like DOS and Netware the file names of exported memos and graphics are quite cryptic to enforce them to be unique. In order to prevent having thousands of files in the output directory it will be cleared before running the export.
All errors are handled within TDB2Web; no further error handling is required.
We learned about three major differences between Navigator 4.0 and Internet Explorer 3.0 that are meaningful to TDB2Web's functionality:
Item Supported by Navigator Explorer Table alignment Yes No Table caption alignment Yes No Separate frames and rules No Yes Another minor difference is that IE underlies the table's title with the background color, in Navigator it is body's background.
The app fails to fire up and tells about missing DLLs OLEPRO32.DLL and MSVCRT40.DLL
This error occured when trying to run the demo-app under Win95 on a computer that has both, NT and 95 installed.
Solution: Copy both of the files from the NT-SYSTEM32 directory to the Win95-SYSTEM directory, and try again.The the app fails to fire up (when started from the IDE) and tells about a missing DMGRAFIK.DLL.
This error occurred on Win95 when trying to start the demo app from the IDE.
Obviously our version of Win95 has massive problems with relative directory names.
Solution: Either specify a fully qualified Search path in the Project properties (the file is located at .\TDB2Web\Runtime\), or copy it to a Delphi-search-path.If you give a relative ExportDir, and try to load the page into an external browser (Registered version only), we found, that IE did not found - the file. Give a fully qualified ExportDir, and it works.
- If you enter the Columns Definition Dialogue with a previously created definition file wherein more fields are stored than actually are offered in the fields-tree, and you try to alter the attributes of a grid's field which is not offered in the fields-tree, you will probably encounter not an error, but some peculiar results. Sorry, we know it, and we will fix it.