⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme.htm

📁 The goal of this library is to make ODBC recordsets look just like an STL container. As a user, you
💻 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 &quot;example&quot;
                and &quot;tests&quot; 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 &quot;Introduction to the DTL&quot;
                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 &quot;make&quot;
                which will run the &quot;Makefile&quot; 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">&gt;create user
                                example identified by example;</font></li>
                            <li><font size="2">&gt;grant dba to
                                example; -- actually we need less
                                than this, but it's easier to
                                grant dba</font></li>
                            <li><font size="2">&gt;connect
                                example/example;</font></li>
                            <li><font size="2">&gt;@e:\dtl\example_db\tables.sql
                                -- run the tables script to
                                create the example tables</font></li>
                            <li><font size="2">&gt;@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 &quot;example&quot; with
                                password &quot;example&quot;.</font></li>
                            <li><font size="2">&gt;mysql
                                &lt;database_name&gt; -u example
                                &lt; tables.sql -- run the tables
                                script to create the example
                                tables</font></li>
                            <li><font size="2">&gt;mysql
                                &lt;database_name&gt; -u example
                                &lt; 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
                &quot;example&quot; 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: &quot;UID=example;PWD=example;DSN=example;&quot;;
                        Therefore it connects as user &quot;example&quot;,
                        password &quot;example&quot; to the ODBC
                        data source named &quot;example&quot;. We
                        assume that the user and password are
                        already set up as explained above &amp;
                        show how to set up the data source name.</font></li>
                    <li><font size="2">Choose the tab labeled
                        &quot;System DSN&quot;. Choose &quot;Add
                        --&gt; Microsoft Access Driver (*.mdb)&quot;.
                        For the data source name enter &quot;example&quot;
                        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 &quot;make&quot; 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
                                &amp; </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&lt;DataObj, ParamObj, BCA, BPA&gt; </font><font
                        size="2"> in version 2.0 the structure is simplified to </font><font size="2"
                        face="Courier New">DBView&lt;DataObj, ParamObj&gt; </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 &quot;range
                transaction&quot; 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 &quot;error while loading shared libraries: 
		libodbc.so.1: cannot open shared object file:  
		No such file or directory&quot;. The problem in this case is not
                having your environment variables set up
                correctly for unixODBC.<br>
                <br>
                From: &quot;Nick Gorham&quot; &lt;nick@lurcher.org&gt;<br>
                To: &lt;cjoy@houston.rr.com&gt;<br>
                Subject: unixODBC<br>
                <br>
                <br>
                &gt; Hi,<br>
                &gt; <br>
                &gt; Your problem is not finding the lib at
                compile time, but at run time,<br>
                &gt; either add /usr/local/lib to LD_LIBRARY_PATH<br>
                &gt; <br>
                &gt; LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib<br>
                &gt; export LD_LIBRARY_PATH<br>
                &gt; <br>
                &gt; (the above assumes linux, if some other OS,
                it's much the same, mail me<br>
                &gt; if you can't find the variable)<br>
                &gt; <br>
                &gt; Or in linux, as root you can add /usr/local/lib
                to /etc/ld.so.conf, and<br>
                &gt; then run ldconfig (often in /sbin/ldconfig),
                to add it to all users lib<br>
                &gt; 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 + -