<?xml version="1.0" encoding="utf-8"?>
<project version="1.0" xmlns="http://dev.int64.org" xmlns:x="http://www.w3.org/1999/xhtml">
	<title>SQLite C++ Wrapper</title>
	<shortname>sqlite</shortname>
	<description>A minimalistic wrapper for SQLite 3.x, inspired by the ADO.NET interfaces.</description>
	<news>
		<item date="2005-06-16">revamped, clean and faster api.</item>
	</news>
	<platform win="true" linux="true" macosx="true" freebsd="true">
		The SQLite C++ Wrapper has been tested on Windows 98, ME, 2000, XP, 2003, in 32-bit and 64-bit.  It should run on Linux/FreeBSD/Mac OSX.  The wchar_t and wstring interfaces assume wchar_t is a 2-byte UTF-16 character, so they probably won't work on anything but Windows.
	</platform>
	<opensource>
		<license uri="http://www.opensource.org/licenses/zlib-license.php">zlib</license>
		<dependencies>
			<link uri="http://www.sqlite.org">SQLite</link>
		</dependencies>
	</opensource>
	<cvs>
		<module>sqlite3x</module>
	</cvs>
	<files>
		<file arch="any" platform="any">
			<version>June 16th, 2005</version>
			<file>sqlite3x.zip</file>
			<url>http://prdownloads.sourceforge.net/int64/sqlite3x-050616.zip?download</url>
			<size>13937</size>
			<description>sqlite3x source</description>
		</file>
	</files>
	<examples>
		<example lang="cpp" description="Inserting Data" xml:space="preserve">
<x:span class="codeinclude">#include &lt;string&gt;</x:span>
<x:span class="codeinclude">#include &lt;iostream&gt;</x:span>
<x:span class="codeinclude">#include &lt;stdexcept&gt;</x:span>
<x:b>using namespace</x:b> std;

<x:span class="codeinclude">#include &quot;sqlite3x.hpp&quot;</x:span>
<x:b>using namespace</x:b> sqlite3x;

<x:b>int</x:b> main(<x:b>void</x:b>) {
   <x:b>try</x:b> {
      sqlite3_connection con(<x:span class="codestring">&quot;test.db&quot;</x:span>);

      <x:b>int</x:b> count=con.executeint(<x:span class="codestring">&quot;select count(*) from sqlite_master where name='t_test';&quot;</x:span>);
      <x:b>if</x:b>(count==<x:span class="codenumber">0</x:span>) con.executenonquery(<x:span class="codestring">&quot;create table t_test(number,string);&quot;</x:span>);

      sqlite3_transaction trans(con);

      {
         sqlite3_command cmd(con, <x:span class="codestring">&quot;insert into t_test values(?,?);&quot;</x:span>);
         cmd.bind(<x:span class="codenumber">2</x:span>, <x:span class="codestring">&quot;foobar&quot;</x:span>, <x:span class="codenumber">6</x:span>);

         <x:b>for</x:b>(<x:b>int</x:b> i=<x:span class="codenumber">0</x:span>; i&lt;<x:span class="codenumber">10000</x:span>; i++) {
            cmd.bind(<x:span class="codenumber">1</x:span>, i);
            cmd.executenonquery();
         }
      }

      trans.commit(); <x:span class="codecomment"><x:i>// note: if trans goes out of scope (due to an exception or anything else) before calling commit(), it will automatically rollback()</x:i></x:span>

      con.close();
   }
   <x:b>catch</x:b>(exception &amp;ex) {
      cerr &lt;&lt; <x:span class="codestring">&quot;Exception Occured: &quot;</x:span> &lt;&lt; ex.what() &lt;&lt; endl;
   }

   <x:b>return</x:b> <x:span class="codenumber">0</x:span>;
}
		</example>
		<example lang="cpp" description="Selecting Data" xml:space="preserve">
<x:span class="codeinclude">#include &lt;iostream&gt;</x:span>
<x:span class="codeinclude">#include &lt;stdexcept&gt;</x:span>
<x:b>using namespace</x:b> std;

<x:span class="codeinclude">#include &quot;sqlite3x.hpp&quot;</x:span>
<x:b>using namespace</x:b> sqlite3x;

<x:b>int</x:b> main(<x:b>void</x:b>) {
   <x:b>try</x:b> {
      sqlite3_connection con(<x:span class="codestring">&quot;test.db&quot;</x:span>);

      {
         sqlite3_command cmd(con, <x:span class="codestring">&quot;select * from t_test;&quot;</x:span>);
         sqlite3_reader reader=cmd.executereader();

         <x:b>while</x:b>(reader.read())
            cout &lt;&lt; reader.getcolname(<x:span class="codenumber">0</x:span>) &lt;&lt; <x:span class="codestring">&quot;: &quot;</x:span> &lt;&lt; reader.getint(<x:span class="codenumber">0</x:span>) &lt;&lt; endl;
      }

      con.close();
   }
   <x:b>catch</x:b>(exception &amp;ex) {
      cerr &lt;&lt; <x:span class="codestring">&quot;Exception Occured: &quot;</x:span> &lt;&lt; ex.what() &lt;&lt; endl;
   }

   <x:b>return</x:b> <x:span class="codenumber">0</x:span>;
}
		</example>
	</examples>
</project>