Structure Printer

included files:
  README.TXT -- this file
  STRCPRN.*  -- the project files
  STRPRN.PAS -- the primary form files
  STRPRN.DFM --  "     "     "     "

This is a  form which will print database file structures.
It is based upon the distributed demo program called "datalist."
It will print the structure of any database file (DB or DBF) which
is addressed through a BDE ALIAS database.  It is printed to a
text file which is then automatically viewed using 'Notepad'.  In
addition a utility is provided to create an SQL routine to create a
table of a similar structure.  This routine may then be copied
to the clipboard and then into a procedure intended to create
the tables for a distributed program.  Some of the procedure may
need to be edited--in particular 1) the intended database name,
2) sizes and types of BLOB fields.  In addition, AUTOINC type fields
are recognized and printed as INTEGER fields.  They need to be 
changed back.  I realize this is a little work and there might be
a fix I haven't found yet.  In any case, the SQL routine generated
will save a lot of work, and is much better than working from a
simple demo.

There is also a section (currently disabled) which attempts to 
generate a table creating routine using CREATETABLE which I could
not get to work correctly.  It creates a routine--but the routine
doesn't work for secondary indexes.  I would be curious to know
if anyone fixes this.  It's not necessary because the SQL routine
works fine and works with AUTOINC fields where CREATETABLE will
not.  But it would be nice to know were the hang-up is.

It has NOT been exhaustively tested but it does do more than a
a couple of utilities I've seen that purport to print table
structures.  --and the price is right.

You have the entire source code which is distributed freely 
and "as is."  I'm sure improvements can be made.  I would like to
hear about them.

I would suggest that you unpack this archive into its own
subdirectory.  Then open the project 'STRCPRN', compile and run
it.  As an alternative, you can extract 'strprn.pas' and add it 
to another project using the Project Manager.

When you copy the output from this program into a form (ie as a
button procedure), that form must also contain a table and Query
objects--default Table1 and Query1.

Have fun,

Martin Beattie
76555,454