📄 readme.htm
字号:
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
<title>Read Me</title>
</head>
<body>
<h1>Instructions for using the Database Template Library </h1>
<ol>
<li><font size="2"><b>Contents</b></font><ol>
<li><font size="2">When you unpack dtl.zip it should
create the following directories:</font></li>
<li><font size="2">\docs: Documentation and examples
on how to use the Database Template Library. To
read, open the main file called index.htm.</font></li>
<li><font size="2">\lib: This is the main code for
the DTL. </font></li>
<li><font size="2">\example_db: Table definitions and
sample data for the code in the "example"
and "tests" directories.</font></li>
<li><font size="2">\example: Example code for using
the DTL.</font></li>
<li><font size="2">\tests: Regression tests for the
DTL / further examples.<br>
</font></li>
</ol>
</li>
<li><font size="2"><b>Getting Started:</b></font><ol>
<li><font size="2">Take a look at the docs files. Be
sure to read "Introduction to the DTL"
as this gives a good overview of the capabilities
of the library.</font></li>
<li><font size="2">Go into the lib directory. Build
the library file (DTL.lib in Windows, dtl.a in
UNIX). To compile from Visual Studio 6.0 open
DTL.dsw. To compile from UNIX type "make"
which will run the "Makefile" in this
directory. (To compile under UNIX you will need
to have unixODBC installed).</font></li>
<li><font size="2">Create the sample database from
the example_db directory.</font> <ol>
<li><font size="2">If you have a copy of
Access97 there is nothing to do here. We
have a sample Access database in the
example_db directory.</font></li>
<li><font size="2">If you are using Oracle
perform the following steps from SQL*PLUS:</font>
<ol>
<li><font size="2">>create user
example identified by example;</font></li>
<li><font size="2">>grant dba to
example; -- actually we need less
than this, but it's easier to
grant dba</font></li>
<li><font size="2">>connect
example/example;</font></li>
<li><font size="2">>@e:\dtl\example_db\tables.sql
-- run the tables script to
create the example tables</font></li>
<li><font size="2">>@e:\dtl\example_db\data.sql
-- insert sample data into the
example tables</font></li>
</ol>
</li>
<li><font size="2">If you are using MySQL
perform the following steps:</font><ol>
<li><font size="2">create a user
called "example" with
password "example".</font></li>
<li><font size="2">>mysql
<database_name> -u example
< tables.sql -- run the tables
script to create the example
tables</font></li>
<li><font size="2">>mysql
<database_name> -u example
< data_mysql.sql -- insert
sample data into the example
tables</font></li>
</ol>
</li>
</ol>
</li>
<li><font size="2">Create an ODBC data source called
"example" from the ODBC Data Source
Administrator tool in the control panel:</font> <ol>
<li><font size="2">The example code uses the
following ODBC connect string: "UID=example;PWD=example;DSN=example;";
Therefore it connects as user "example",
password "example" to the ODBC
data source named "example". We
assume that the user and password are
already set up as explained above &
show how to set up the data source name.</font></li>
<li><font size="2">Choose the tab labeled
"System DSN". Choose "Add
--> Microsoft Access Driver (*.mdb)".
For the data source name enter "example"
and choose the file called example.mdb in
the example_db directory. (If you prefer
to use Oracle choose the Oracle ODBC
driver and enter your SQL*NET connect
string etc.)</font></li>
</ol>
</li>
<li><font size="2">Build and run the example code.</font>
<ol>
<li><font size="2">Go to the directory called
\example. Open the file example.dsw and
build from VC++ 6.0 to create the example
executable. (Or run "make" from
the example directory if you are working
under UNIX).<br>
</font></li>
</ol>
</li>
</ol>
</li>
<li><font size="2"><b>Using the library in your own code:</b></font><ol>
<li><font size="2">To use the library in your own
code you will need to do two things:</font> <ol>
<li><font size="2">Include the \lib directory
in the include (\I) path for your
compiler.</font></li>
<li><font size="2">Include the library file (DTL.lib
or dtl.a) in the set of files that you
link to in producing your executable.<br>
</font></li>
</ol>
</li>
</ol>
</li>
<li><font size="2"><strong>Release Notes</strong></font><ol>
<li><font size="2"><em><strong>Version 2.0</strong></em></font>
<ol>
<li><font size="2">Added support for Boris Fomitchev's
STLPort implementation of the SGI Standard
Template Library.</font></li>
<li><font size="2">Successfully ported code
to Red Hat Linux 7 under gcc 2.95 running
unixODBC and a MySQL 3.23.33 database.</font></li>
<li><font size="2">Corrected constness
throughout DTL. This fixed some issues that we had in 1.1 which
prevented us from running correctly versus some of the standard
STL algorithms.</font></li>
<li><font size="2">Rewrote the code to make
it exception safe.</font></li>
<li><font size="2">Added error handling
support for all DTL iterator classes,
DBView, and IndexedDBView in the form of
IOHandler.</font></li>
<li><font size="2">Iterator refinements: </font><ol>
<li><font size="2" face="Courier New">DB_select_iterator::operator*()
</font><font size="2">now returns
a </font><font size="2"
face="Courier New">const DataObj
& </font><font size="2">to
make that operation truly read-only.</font>
</li>
<li><font size="2">All output
iterators now use proxies to
emulate </font><font size="2"
face="Courier New">*it = value to
</font><font size="2">enforce
their write-only quality.</font> </li>
<li><font size="2">Also fixed prefix/postix
implementation for </font><font
size="2" face="Courier New">operator++()
</font><font size="2">on all
iterators. </font></li>
</ol>
</li>
<li><font size="2">Enhanced </font><font
size="2" face="Courier New">DBConnection </font><font
size="2">class to use ODBC connection
pooling. </font></li>
<li><font size="2">Added Julian date support through
the </font><font size="2"
face="Courier New">jtime_c </font><font
size="2">class. <br>
</font></li>
<li><font size="2">Simplified the structure for </font><font size="2"
face="Courier New">DBView </font><font
size="2"> to need fewer template parameters. In version 1.1
the structure was </font><font size="2"
face="Courier New">DBView<DataObj, ParamObj, BCA, BPA> </font><font
size="2"> in version 2.0 the structure is simplified to </font><font size="2"
face="Courier New">DBView<DataObj, ParamObj> </font><font
size="2">.<br>
</font></li>
</ol>
</li>
</ol>
</li>
<li><font size="2"><strong>Notes for Linux.</strong></font><ol>
<li><font size="2">The MySQL ODBC driver </font>version
2.50.36-1 <font size="2">on Linux does not work
correctly with </font><font size="2"
face="Courier New">SQLPrepare(). </font><font
size="2">Current workaround involves calling </font><font
size="2" face="Courier New">SQLExecDirect() </font><font
size="2">rather than </font><font size="2"
face="Courier New">SQLPrepare(). </font><font
size="2">To compile with this workaround define
the symbol </font><font size="2"
face="Courier New">MYODBC_BUG </font><font
size="2">as described in the makefile. (Another alternative is to
download the source for MyODBC and re-compile. On the test machine
we used this also seemed to fix the problem.) </font></li>
<li><font size="2">MySQL 3.23.33 does not support
COMMIT or ROLLBACK. Therefore the "range
transaction" examples will not work under
this version MySQL.</font></li>
<li><font size="2">When you run the executable for
the first time under unixODBC you may get a message
like "error while loading shared libraries:
libodbc.so.1: cannot open shared object file:
No such file or directory". The problem in this case is not
having your environment variables set up
correctly for unixODBC.<br>
<br>
From: "Nick Gorham" <nick@lurcher.org><br>
To: <cjoy@houston.rr.com><br>
Subject: unixODBC<br>
<br>
<br>
> Hi,<br>
> <br>
> Your problem is not finding the lib at
compile time, but at run time,<br>
> either add /usr/local/lib to LD_LIBRARY_PATH<br>
> <br>
> LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib<br>
> export LD_LIBRARY_PATH<br>
> <br>
> (the above assumes linux, if some other OS,
it's much the same, mail me<br>
> if you can't find the variable)<br>
> <br>
> Or in linux, as root you can add /usr/local/lib
to /etc/ld.so.conf, and<br>
> then run ldconfig (often in /sbin/ldconfig),
to add it to all users lib<br>
> search paths.</font><font size="2"
face="Courier New"><br>
</font></li>
</ol>
</li>
</ol>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -