PATHAGORAS™ Users' Guide, Part 6
Database
Connections
Pathagoras can link to any datasource that Word can link to.
Pathagoras does its linking to a datasource in a rather unique way
-- it simply 'borrows' the link information contained in a
single Word document to which you have previously connected to
your datasource. In other words, once you create a single document
which links to your datasource, Pathagoras uses that document to make
all future connections. That document can be a blank document, or it
can have text in it. That document serves simply as the portal into the
database. Simply 'register' this document on the Database Settings
screen (discussed below). This document is called the 'bridge' document.
Separately, you would have (or create) a glossary with a series of
clauses. (It could also be a simple document with fields, but that
won't highlight Pathagoras document assembly power.) Some or all of
these clauses would contain fields which match up to the
fields in your database.
This linking is done after the final document
is created or brought to the screen. Here's the flow:
- Assemble the document from the glossary. The assembled
document will have within it one, 10, 100 (you get the idea) fields
which match up with the database, but the new document you just created
doesn't yet link to the database.
- Press the "Search Database" button (from the Pathagoras
drop down list--the one with the binoculars). You will be asked if you
want to link the document to the database. Assuming that you do, choose
which one from the list of registered documents (one of which will be
the document you created in the previous paragraph).
- Pathagoras 'borrows' the link of that document and uses it
to link the present document to that same database. It's really clever
(pat self on back) and it really works. Sometimes it takes some trial
and error before the concepts fully sink in.
- The database connection can be automatically made at the
end of
the document assembly process if the name of the 'bridge' document is
placed in the 'templates' field in the Document Assembly 'Settings'
page.
- Even if you are creating a new
document and never intend to use Pathagoras features, you can link that
document to a database, in the same fashion as discussed above. Just
display the binoculars, choose one of up to five bridge documents and
press "Go."
Very simple, very quick. No
more of those
complex "Mail Merge" steps.
| Definition: Data
Source: Any file,
document, spreadsheet,
database or other electronic 'container' that houses data in an
organized
fashion can be a data source. 'Data' can be anything, but most commonly
comprise names, addresses, sizes, titles, colors, genders, etc. A
'database'
is a common type of data source. Access, Act, Alpha5, dbaseV,
Paradox,
and TimeMatters are but a few of the many off the shelf databases that
are available. In addition to these sophisticated programs, Word can
use
a variety of other more mundane sources for obtaining data (a table in
a Word file, a comma or tab delimited plain text file) and other
not "database" sources which mimic databases, e.g., spreadsheet
(Excel,
Quattro Pro, etc.) Outlook and many others. |
Pathagorean
theorem:
Most other document assembly programs that allow database linkage do so
in the reverse order from that of Pathagoras. They typically have you
open
their programs, select the client or customer for whom you want to
create
a document, and then you create the document for the particular
client/customer.
With Pathagoras, you start in Word and stay in Word. You create the
document
(via document assembly, insertion of a template, whatever) and
then,
while still in Word, link to the database. One way is not necessarily
better
than another, except that if you select the wrong client or customer in
other programs, you have to start over.
With Pathagoras, if you select the wrong client, just search for the
right
one. (Actually, when you think about it, Pathagoras' way is better),
Everything
will refresh to reflect the correct information. Further, if as you
peruse
the document you see that some personal information is out of date,
simply
activate the database, make the updates, return to the document and
refresh
the data by searching for the client again. You never have to
recreate
documents just because the data was wrong or out of date.
Summary:
Three simple steps are all that are needed to establish a Pathagorized
connection to your database (more detailed instructions are provided
after
this summary).
1.
Create a
document and link it to the database or other data source of your
choosing.
(Use Words 'Mail Merge' facility (Word 97-2000) or Letters and Mailings
(WordXP) found under the Tools menu to create the link.) Leave
this
document in the active window. Alternatively, you can open up a
document
that you know is already linked to the desired database or other data
source
and continue with step 2.
2. Activate
the Database
Settings screen and click once in an option circle to the left of one
of
the five rows. Your selection of rows is not critical, but it should be
a blank one if you are adding a new datasource. Click on an existing
one
if you want to override that entry. Click <AutoFill> and follow
the
prompt and provide the information requested. It is all quite
automatic.
The document you created (or opened) in step 1 above is examined for
link
information, which information is in turn stored by Pathagoras. In
actuality
this document becomes the "home base" for future database links, but
you
don't need to do any more work. Remember (or write down) the nickname
you
give to the database connection.
3. Insert the
nickname
of your data source to the 'templates' field on the appropriate line in
the DocAssembly profile.
The
Details: The 'control point' for creating a Pathagorized link to
your
data is the Database Settings screen. It is accessed via the Pathagoras
DropDown menu. Lets take a brief tour of the page, (but note-- you will
not use this page until you get to step 2 below.)

Screen tour.
The five rows of text boxes
represent
the up to 5 separate databases (Access, Alpha5, Act, dbase, etc.) or
other
data sources (Excel spreadsheets, Word documents, comma delimited text
files) to which you can create a Pathagorized link. The first column is
a user selected 'nickname.' This name will represents the Pathagorized
link throughout the system. The second column is the name of the plain
Word template (just a .dot file that you create in the first step of
the
process) which contains the link to the desired database. The third
column
is the actual name of the underlying database (including full DOS
path).
It is not really a mandatory field, but, by providing the full name
here,
you will be able to easily open the database while you are in Word. The
fourth column is the specific table (or range, if Excel is the data
source)
which contains the actual data. (Note, several tables can be contained
within a singe database. If you are not sure which table is the
right
one, ask your system administrator.) The fifth and sixth columns
contain
references to the alpha- and numeric sort fields by which searches will
typically be made. Completing these fields is optional.
<AutoFill> This
button allows
you to complete most of the boxes automatically with the appropriate
information.
Pathagoras simply 'reads' the background information from the
underlying
template. This button is displayed only when the active document is a
template
currently linked to a database.
<Link to Selected
Database>:
Pressing this button will link your active document to the selected
database.
Instantly, without having to navigate the MailMerge maze. (Same as
double
clicking inside of the option circle.)
<Unlink document from
Database>
If you save and close a document which is linked to a database, there
will
be a significant delay when you attempt to reopen that
document.
You may wish to consider unlinking the document from it database before
saving it. Re-linking is quick (just press the <Link to Selected
Database>
button).
<Open Template>
Click this button
to open the template that is associated with the selected datasource.
CREATING A PATHAGORIZED LINK TO
A DATABASE
The setup procedures for making
a Pathagorize
link to your datasource is a three step process:
1. Create or locate a template that links to the desired
database.
Using Word's Mail Merge feature to connect to the database. You only
need
to get as far in the Mail Merge routine as to be connected to the
database
and a table within the database. "X" out of the Mail Merge routine when
it starts asking you select specific recipients for the letter. (See
the
Pathagoras Users’ Guide for step by step instructions on how to
complete
the ‘MailMerge’ steps to link a database to a template.)
The
step and screen
displays which Word XP uses are significantly different from those of
earlier
versions of Word. The step of getting from here to there are described
below.
| Word 97, 2000 & NT |
WordXP |
| 1. Open a blank screen |
1. Open a blank screen. |
| 2. Click on the Tools menu. Select Mail
Merge from the drop
down list |
2. Click on the Tools menu. Select Letters and
Mailings, and
then Mail Merge wizard from the drop down list. |
| 3. Select 'Create' from the display.
Choose 'Form Letters'
as the type of document to create, and the select 'Active Window' to
use
the current display. That completes 'Step 1.' |
3. Select 'Letters' from the display on the
right side of the
page near the top and proceed to the first step by clicking on the
'Next:
Starting Document' link at the bottom of the page. |
| 4. Press the 'Get Data' button in 'Step
2' and click on
the 'Open Data Source' button. Navigate to your database or other data
source. If you a seeking a source with an extension different
from
the default extension shown, be sure to select the 'All files' filter,
or the specific one for your database. |
4. Select 'Use Current Document' from the list
on the right side
of the page near the top and proceed to the next step by clicking on
the
'Next: Select Recipients' link at the bottom of the page. |
| 5. Once you have located and
locked in the data
source, the name of the selected data source will appear on the screen.
Exit out of the wizard. (You have not finished using the wizard, but
you
have gone as far as needed to create your 'linking template' for
Pathagoras'
needs. |
5. Select 'Use an Existing List' from the
display on the right
side of the page near the top (or select the 'Select from Outlook
Contacts').
Click the 'Browse' link in the middle of the column and navigate to
your
database or other data source. If you a seeking a source with an
extension different from the default extension shown, be sure to select
the 'All files' filter, or the specific one for your database. |
| 7. Save the page as a
template in the default
templates path. The page will still be blank, but don't worry, the
datalink
is in the background. (You can check this out by right clicking on the
menu and displaying the Mail Merge tool bar.) |
6. Once you have located and locked in
the data source,
'Browse' will no longer appear in the middle section, but the name of
the
selected data source and the choices ''Select a Different List'
and
'Edit Recipient List' will. Exit out of the wizard. (You have not
finished using the wizard, but you have gone as far as needed to create
your 'linking template' for Pathagoras' needs. |
| 8. Follow the below steps to
complete the assignment
of a nickname to this template for document assembly purposes. |
7. Save the page as a template in the
default templates
path. The page will still be blank, but don't worry, the datalink is in
the background. (You can check this out by right clicking on the menu
and
displaying the Mail Merge tool bar.) |
|
8. Follow the below steps to complete the
assignment of a nickname
to this template for document assembly purposes. |
You don't have to create a new template in order to create a
Pathagorized
link. The template described above can also be an existing template.
(For
those who do not know this, a template is merely a document with a
".dot"
extension instead of a ".doc" extension. It is not necessary for
a template to have any text within it. The template that you create or
open above can be completely blank (despite Word's suggestion that it
must
have fields) or can be a complete template with database fields, text,
pictures, margin controls, paragraph numbering styles, paragraph
formatting,
and headers and footers.)
The template can be saved anywhere, but it must be saved somewhere
before
the next steps can be completed. The ‘default templates directory’ is
probably
the best place for it (that way you can easily use the template
for
non-Pathagoras purposes). Both Word and SaveSmart will save a
template
‘by default’ in the default templates directory. (Unlike Word,
SaveSmart
easily allows you to save your template somewhere else, if that is your
preference.)
2. The next step is to extract information from your template and to
put
it into the Database Settings screen (an example of completed screen is
shown above.) It is possible for you to fill out the Database Settings
screen manually (explained below), but it is easier (if not 'safer') to
do so using Pathagoras' automatic features.
Automatic
set ("<AutoFill>"):
Note: The template you
just completed
above must be the active document.
a. From
the Pathagoras drop down menu, select DataBase Settings. (You can also
press Database Functions and choose Database Settings from that sub
menu,
or choose MainMenu and choose Database Setting from that screen. All
take
you to the same place.)
b. Press
the <AutoFill> button. (This button will display only if a
template
connected to a database is displayed in the active window. If you don't
see the button, you are not ready to proceed.) When prompted,
provide
the nickname you want to refer this template as. (The term can be
the name of the database, or anything else, but it should be meaningful
and easy to remember. In our office we use "Clients.")
Optional:
When prompted, provide the fieldname of the database field which stores
your 'alphasort' data. Typically this will be the field which contains
the last names of your clients, patients or customers. Pathagoras
assumes
that the sort field are one of the first fields of the database
structure
and will display on the input screen the names of the first 10 database
fields. (This is to insure spelling accuracy. If the alphasort
field
is not within the first ten, and you are not sure of the spelling, you
will have to locate the proper spelling on your own.)
Optional: When
prompted, provide the fieldname of the database field which stores your
'numeric search' data. Typically this will be the field which contains
your clients' or customers' identification numbers. (This
is
to insure spelling accuracy. If the numeric sort field is not within
the
first ten, and you are not sure of the spelling, you will have to
locate
the proper spelling on your own.)
When prompted, indicate
whether
your connection is a direct connection to the data or is done via ODBC.
In most cases Pathagoras will correctly identify the source, so you
probably
should accept the default answer. If you later have problems in
connecting
to the database, you might change the checkbox on this screen. Once you
have completed these steps, save the Database Settings and close the
screen.
Also close the template which contains the link. It has served its
purpose,
and from know on will be referenced only in the background. (You can,
however,
recall it via the Document Settings screen, modify it, copy it to
create
a variety of templates using this template as a base, etc. Or you can
leave
it alone forever.)
Manual
Set:
a. In the
first column
in the first available row, type a descriptive one word nickname which
will represent this particular database. (The term can be the
name
of the database, or anything else, but it should be meaningful and easy
to remember. In our office we use "Clients."
b. In the second
column on
the screen, type the name of the template you created in step 1. If the
template is not in the default templates path, you must provide the
full
DOS address to the template.
c. Optional:
In the
NameSearch-and NumberSearch- columns, type in the names of the field
you
typically use to search for a client or customer by name or by
number
About the AlphaSort Field and NumericSort Fields.
If you have
(accurately) completed the Alpha and Numeric sort fields, here is what
will happen: After you have assembled a document using
Pathagoras,
the program will present to you its own 'search screen' asking
you
to provide a name or a number. If you then provide an all numeric
entry,
Pathagoras will look for the desired record in the field you assigned
in
the Numeric Sort field.. If Pathagoras detects an alpha- or
alphanumeric
entry, it will search in the field indicated in the NameSort field. You
do not have to tell the program which you are providing! You alos do
not
have to search down a list of fields to select which field you want to
search in.
Save and close the Database Setting screen. You can
also close
(and now forget about) the template that you created.
Searching the database: Once all the settings above have been
accomplished
(both in the Database Settings and the Document Assembly Settings
screens),
and your document has been assembled or recalled to the screen, search
the database by clicking on the <Database Search> button from the
Pathagoras
drop-down menu.
Advanced
uses of the Database Settings screen:
Multiple instances of templates with same
databases.
You
need perform
a 'create a template step' only once per database you intend to use.
However,
you might have several templates which use the same database but which
have different 'styles' attached to them (i.e., a templates for
different
margin and page settings, paragraph formatting, paragraph numbering,
headers
and footers, templates with pre-existing text, etc.). You will have two
choices in these 'multiple template' situations: .(a) You can link each
template that you create to the database, and attach each template (up
to the 5 limit) to the database settings screen; or (2) attach
only
one of the templates which links to your database and reference that
template
(or its nickname) to all of the other templates. Method (2) is
ultimately
the preferable method (because it preserves room for more data sources)
but it is a bit more complicated.
Quick connect to a
Pathagorized link
to a datasource:
If
you indicated in the Document Assembly Settings screen that you wanted
to link documents of a particular subject to a database (using the
nickname
of the database in the 'Templates' field), the connection will
automatically
be made for you. This is so whether you are creating a document from
clauses
or recalling a complete document.
Sometimes,
however, you want to start from a blank document, or from a
document
that has not yet been linked to a database. Assuming that a database
has
been referenced on one of the 5 lines of the Database Settings screen,
Pathagoras can link you quickly to a database of your choice in those
situations
as well. Simply display the Database Settings screen (from the drop
down
menu), click on the line which references the particular database, and
press "Link to Selected Database."
Even the
above
steps can be skipped over because of assumptions that Pathagoras makes
if you fail to take certain steps. So, if you are displaying a
document
which is not linked to a database, and 'accidentally' press the Search
Database button from the Pathagoras Drop-Down menu, Pathagoras
will
ask you if you want to link to a database. The 'downside' of this
method
is that you will only be presented the nicknames of the database
links, not the full Database Settings screen. But if you know the names
of your databases, this is definitely the quickest way.
De-Linking from and
Re-linking to a
Database
You
may
notice that when you create a document with a link to a database, save
and later recall the document, there is a significant delay before you
can work on the document. This is because, when you open a document
last
saved with a database link active, Word will attempt to reconnect
to the database and to locate the record which was last selected. You
can
avoid this delay by unlinking the document before you save it. Use the
button in the Pathagoras drop-down menu called Unlink. All of the data
from the search will be preserved. If you want to reconnect the
document
to the database to perform another search, Pathagoras allows you to do
so quickly. Pathagoras pre-codes documents it creates in such a way as
to allow the automatical re-link. All you need to do is press the
search
icon (the binoculars).
More on
templates: In the 'simple' instructions provided above you were
directed
to put the nickname of the template which connected to your database
into
the 'template' column on the document assembly setup screen. But what
if
the documents you create from that line needs a template that does more
than link to the database. Perhaps this template provides special
formatting
(outlining, page numbering, text layout, etc.) Must you use up
one
the precious five database link lines to this special template?
NO!
Pathagoras has thought of that situation and provided a solution that
occupies
zero additional lines on the document assembly setup screen. Create the
template as before, and save the template to your default templates
screen,
as before. Before you save the document, press File|Properties
and
click on the custom properties tab. In the Name block type "DataLinkAD"
(careful--this is case sensitive) and on the Value line, type
the
nickname of the template that you know links to the database. Press
'Add'
and close the window. Save the document.
Of
course, Pathagoras' 'Instant Database' is still available, and works
nicely
along side of, and in addition to, or in place of a "real" database.
Further,
Pathagoras is always aware of which type(s) of database(s) ("real"
and/or
"instant") the document is dependent upon. If your document uses both
kinds
(a 'real' database, for example, for names and addresses and other
fields,
and Instant Database coding for items that you do not collect
information
on in your 'real' database), Pathagoras offers you a choice of which
database
to use when you want to perform a search.
Here are the three (more) simple steps to further develop your word
processing
system using Pathagoras, your text and your database:
1.
Open (or
create and save) a document that you know is linked to the database of
your choosing and <AutoFill> one of the five Database Settings
rows.
Remember (or write down) the nickname of the database connection.
2. Break you
complete
documents into smaller portions, one topic, subject or paragraph per
portion.
Save the portions into separate documents within the same folder, or as
separate glossary terms. If your document already has database fields
create
the separate clauses irrespective of those fields. They transfer nicely
into the separate clauses.
3. Attach the
glossary
or the directory to a DocAssembly profile (or multiple profiles).
In the 'templates' field, insert the nickname of the database
connection.
 |
..
|
After you have assembled or
recall a document,
press the <DataBase Search> from the Pathagoras drop-down
menu.
Follow the prompts.
Q.: I already have a complete
glossary
with Instant Database fields that I would now like to convert over into
a database compatible glossary. How difficult is it to do that?
A.: Not difficult at all. Open the
glossary
to your editing screen. Link the glossary to the desired database via
the
Database settings screen. Activate the Mail Merge tool bar. (Right
click
on a blank area in the menu area at the top of the Word screen, and
click
on 'Mail Merge' from the list that drops down.) Using the Insert
MergeField
button on the Mail Merge toolbar, insert the desired database fields at
the appropriate locations in the glossary, no doubt in lieu of many of
your Instant Database variables. Once you have placed (and perhaps
formatted)
a certain field that you want to use elsewhere in the glossary, you can
copy and paste it where ever you want it, using regular Word features.
This can greatly speed up the process.
You will probably find that you database does not contain information
sufficient
to substitute for all of the IDB fields. That's okay. IDB and
your
'real' database coexist well with, and complement, each other.
Once you have finished inserting the fields, unlink the database from
the
glossary (to improve access speed to the glossary) and save it.
That
is all. When you build your next documents, the database fields will be
there.
Remember,
Pathagoras does not provide the database. It uses yours. It doesn't
dictate
how you use your database -- it simply follows your existing style and
makes it easier for you. So, if you can link a Word document to
your
database in any fashion (a DDE connection, lets say for Access or
Excel,
or an ODBC connection, let's say for ACT or dBase), Pathagoras will be
able to use your data. No proprietary claims for Pathagoras, no sir.
This
is in keeping with "Pathagorian theory" that you own the program, the
program
does not own you
View
Introduction (Part 1).
View
Part 2 of Users' Guide (PathSmart module)
View
Part 3 of Users' Guide (SaveSmart module)
View
Part 4 of Users' Guide (Document Assembly module)
View
Part 5 of Users' Guide (Glossary module)
View
Part 7 of Users' Guide (Other Features)
|