Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > a6711891ce757817bba854bf3f25205a > files > 2503

qtjambi-doc-4.3.3-3mdv2008.1.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.5.0_09) on Tue Aug 07 17:07:12 CEST 2007 -->
<TITLE>
QSqlDatabase
</TITLE>

<META NAME="keywords" CONTENT="com.trolltech.qt.sql.QSqlDatabase class">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    parent.document.title="QSqlDatabase";
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../com/trolltech/qt/sql/QSql.TableType.html" title="enum in com.trolltech.qt.sql"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../com/trolltech/qt/sql/QSqlDriver.html" title="class in com.trolltech.qt.sql"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html?com/trolltech/qt/sql/QSqlDatabase.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="QSqlDatabase.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;<A HREF="#nested_classes_inherited_from_class_com.trolltech.qt.QSignalEmitter">NESTED</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
com.trolltech.qt.sql</FONT>
<BR>
Class QSqlDatabase</H2>
<PRE>
java.lang.Object
  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../com/trolltech/qt/QSignalEmitter.html" title="class in com.trolltech.qt">com.trolltech.qt.QSignalEmitter</A>
      <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../com/trolltech/qt/QtJambiObject.html" title="class in com.trolltech.qt">com.trolltech.qt.QtJambiObject</A>
          <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.trolltech.qt.sql.QSqlDatabase</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../com/trolltech/qt/QtJambiInterface.html" title="interface in com.trolltech.qt">QtJambiInterface</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>QSqlDatabase</B><DT>extends <A HREF="../../../../com/trolltech/qt/QtJambiObject.html" title="class in com.trolltech.qt">QtJambiObject</A></DL>
</PRE>

<P>
<p>The <a href="QSqlDatabase.html#QSqlDatabase()"><tt>QSqlDatabase</tt></a> class represents a connection to a database.</p>
<p>The <a href="QSqlDatabase.html#QSqlDatabase()"><tt>QSqlDatabase</tt></a> class provides an abstract interface for accessing database backends. It relies on database-specific <a href="QSqlDriver.html"><tt>QSqlDriver</tt></a>s to actually access and manipulate data.</p>
<p>The following code shows how to initialize a connection:</p>
<pre>        QSqlDatabase db = QSqlDatabase::addDatabase(&quot;QPSQL&quot;);
        db.setHostName(&quot;acidalia&quot;);
        db.setDatabaseName(&quot;customdb&quot;);
        db.setUserName(&quot;mojito&quot;);
        db.setPassword(&quot;J0a1m8&quot;);
        bool ok = db.open();</pre>
<p>Once a <a href="QSqlDatabase.html#QSqlDatabase()"><tt>QSqlDatabase</tt></a> object has been created you can set the connection parameters with <a href="QSqlDatabase.html#setDatabaseName(java.lang.String)"><tt>setDatabaseName</tt></a>, <a href="QSqlDatabase.html#setUserName(java.lang.String)"><tt>setUserName</tt></a>, <a href="QSqlDatabase.html#setPassword(java.lang.String)"><tt>setPassword</tt></a>, <a href="QSqlDatabase.html#setHostName(java.lang.String)"><tt>setHostName</tt></a>, <a href="QSqlDatabase.html#setPort(int)"><tt>setPort</tt></a>, and <a href="QSqlDatabase.html#setConnectOptions(java.lang.String)"><tt>setConnectOptions</tt></a>. Once the parameters have been set up you can call <a href="QSqlDatabase.html#open(java.lang.String, java.lang.String)"><tt>open</tt></a> to open the connection.</p>
<p>The connection defined above is a nameless connection. It is the default connection and can be accessed using <a href="QSqlDatabase.html#database(java.lang.String, boolean)"><tt>database</tt></a> later on:</p>
<pre>        QSqlDatabase db = QSqlDatabase::database();</pre>
<p>To make programming more convenient, <a href="QSqlDatabase.html#QSqlDatabase()"><tt>QSqlDatabase</tt></a> is a value class. Any changes done to a database connection through one <a href="QSqlDatabase.html#QSqlDatabase()"><tt>QSqlDatabase</tt></a> object will affect other <a href="QSqlDatabase.html#QSqlDatabase()"><tt>QSqlDatabase</tt></a> objects representing the same connection. Call <a href="QSqlDatabase.html#cloneDatabase(com.trolltech.qt.sql.QSqlDatabase, java.lang.String)"><tt>cloneDatabase</tt></a> if you want to create an independent database connection based on an existing one.</p>
<p>If you need multiple database connections simultaneously, specify an arbitrary name to <a href="QSqlDatabase.html#addDatabase(com.trolltech.qt.sql.QSqlDriver, java.lang.String)"><tt>addDatabase</tt></a> and <a href="QSqlDatabase.html#database(java.lang.String, boolean)"><tt>database</tt></a>. Call <a href="QSqlDatabase.html#removeDatabase(java.lang.String)"><tt>removeDatabase</tt></a> to remove connections. <a href="QSqlDatabase.html#QSqlDatabase()"><tt>QSqlDatabase</tt></a> will output a warning if you try to remove a connection referenced by other <a href="QSqlDatabase.html#QSqlDatabase()"><tt>QSqlDatabase</tt></a> objects. Use <a href="QSqlDatabase.html#contains(java.lang.String)"><tt>contains</tt></a> to see if a given connection name is in the list of connections.</p>
<p>Once a connection is established you can see what tables the database offers with <a href="QSqlDatabase.html#tables(com.trolltech.qt.sql.QSql.TableType)"><tt>tables</tt></a>, find the primary index for a table with <a href="QSqlDatabase.html#primaryIndex(java.lang.String)"><tt>primaryIndex</tt></a>, get meta-information about a table's fields (e.g&#x2e;, their names) with <a href="QSqlDatabase.html#record(java.lang.String)"><tt>record</tt></a>, and execute a query with <a href="QSqlDatabase.html#exec(java.lang.String)"><tt>exec</tt></a>.</p>
<p>If transactions are supported, you can use <a href="QSqlDatabase.html#transaction()"><tt>transaction</tt></a> to start a transaction, and then <a href="QSqlDatabase.html#commit()"><tt>commit</tt></a> or <a href="QSqlDatabase.html#rollback()"><tt>rollback</tt></a> to complete it. You can find out whether transactions are supported using QSqlDriver::hasFeature(). When using transactions you must start the transaction before you create your query.</p>
<p>If an error occurred, it is given by <a href="QSqlDatabase.html#lastError()"><tt>lastError</tt></a>.</p>
<p>The names of the underlying SQL drivers are available from <a href="QSqlDatabase.html#drivers()"><tt>drivers</tt></a>; you can check for a particular driver with <a href="QSqlDatabase.html#isDriverAvailable(java.lang.String)"><tt>isDriverAvailable</tt></a>. If you have created your own custom driver, you can register it with <a href="QSqlDatabase.html#registerSqlDriver(java.lang.String, com.trolltech.qt.sql.QSqlDriverCreatorBase)"><tt>registerSqlDriver</tt></a>.</p>
<P>

<P>
<DL>
<DT><B>See Also:</B><DD><a href="QSqlDriver.html"><tt>QSqlDriver</tt></a>, 
<a href="QSqlQuery.html"><tt>QSqlQuery</tt></a>, 
<tt>QtSql Module</tt>, 
<a href="%2E%2E/threads.html#threads-and-the-sql-module">Threads and the SQL Module</tt></a></DL>
<HR>

<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->

<A NAME="nested_class_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Nested Class Summary</B></FONT></TH>
</TR>
</TABLE>
&nbsp;<A NAME="nested_classes_inherited_from_class_com.trolltech.qt.QSignalEmitter"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Nested classes/interfaces inherited from class com.trolltech.qt.<A HREF="../../../../com/trolltech/qt/QSignalEmitter.html" title="class in com.trolltech.qt">QSignalEmitter</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal0.html" title="class in com.trolltech.qt">QSignalEmitter.Signal0</A>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal1.html" title="class in com.trolltech.qt">QSignalEmitter.Signal1</A>&lt;<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal1.html" title="type parameter in QSignalEmitter.Signal1">A</A>&gt;, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal2.html" title="class in com.trolltech.qt">QSignalEmitter.Signal2</A>&lt;<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal2.html" title="type parameter in QSignalEmitter.Signal2">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal2.html" title="type parameter in QSignalEmitter.Signal2">B</A>&gt;, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal3.html" title="class in com.trolltech.qt">QSignalEmitter.Signal3</A>&lt;<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal3.html" title="type parameter in QSignalEmitter.Signal3">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal3.html" title="type parameter in QSignalEmitter.Signal3">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal3.html" title="type parameter in QSignalEmitter.Signal3">C</A>&gt;, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal4.html" title="class in com.trolltech.qt">QSignalEmitter.Signal4</A>&lt;<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal4.html" title="type parameter in QSignalEmitter.Signal4">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal4.html" title="type parameter in QSignalEmitter.Signal4">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal4.html" title="type parameter in QSignalEmitter.Signal4">C</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal4.html" title="type parameter in QSignalEmitter.Signal4">D</A>&gt;, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal5.html" title="class in com.trolltech.qt">QSignalEmitter.Signal5</A>&lt;<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal5.html" title="type parameter in QSignalEmitter.Signal5">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal5.html" title="type parameter in QSignalEmitter.Signal5">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal5.html" title="type parameter in QSignalEmitter.Signal5">C</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal5.html" title="type parameter in QSignalEmitter.Signal5">D</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal5.html" title="type parameter in QSignalEmitter.Signal5">E</A>&gt;, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="class in com.trolltech.qt">QSignalEmitter.Signal6</A>&lt;<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="type parameter in QSignalEmitter.Signal6">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="type parameter in QSignalEmitter.Signal6">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="type parameter in QSignalEmitter.Signal6">C</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="type parameter in QSignalEmitter.Signal6">D</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="type parameter in QSignalEmitter.Signal6">E</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="type parameter in QSignalEmitter.Signal6">F</A>&gt;, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="class in com.trolltech.qt">QSignalEmitter.Signal7</A>&lt;<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">C</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">D</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">E</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">F</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">G</A>&gt;, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="class in com.trolltech.qt">QSignalEmitter.Signal8</A>&lt;<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">C</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">D</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">E</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">F</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">G</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">H</A>&gt;, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="class in com.trolltech.qt">QSignalEmitter.Signal9</A>&lt;<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">C</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">D</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">E</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">F</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">G</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">H</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">I</A>&gt;</CODE></TD>
</TR>
</TABLE>
&nbsp;

<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#QSqlDatabase()">QSqlDatabase</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates an empty, invalid <a href="QSqlDatabase.html#QSqlDatabase()"><tt>QSqlDatabase</tt></a> object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#QSqlDatabase(com.trolltech.qt.sql.QSqlDatabase)">QSqlDatabase</A></B>(<A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html" title="class in com.trolltech.qt.sql">QSqlDatabase</A>&nbsp;other)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a copy of <tt>other</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected </CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#QSqlDatabase(com.trolltech.qt.sql.QSqlDriver)">QSqlDatabase</A></B>(<A HREF="../../../../com/trolltech/qt/sql/QSqlDriver.html" title="class in com.trolltech.qt.sql">QSqlDriver</A>&nbsp;driver)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a database connection using the given <tt>driver</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected </CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#QSqlDatabase(java.lang.String)">QSqlDatabase</A></B>(java.lang.String&nbsp;type)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a <a href="QSqlDatabase.html#QSqlDatabase()"><tt>QSqlDatabase</tt></a> connection that uses the driver referred to by <tt>type</tt>.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html" title="class in com.trolltech.qt.sql">QSqlDatabase</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#addDatabase(com.trolltech.qt.sql.QSqlDriver)">addDatabase</A></B>(<A HREF="../../../../com/trolltech/qt/sql/QSqlDriver.html" title="class in com.trolltech.qt.sql">QSqlDriver</A>&nbsp;driver)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Equivalent to <a href="QSqlDatabase.html#addDatabase(com.trolltech.qt.sql.QSqlDriver, java.lang.String)"><tt>addDatabase</tt></a>(<tt>driver</tt>, QLatin1String( defaultConnection )).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html" title="class in com.trolltech.qt.sql">QSqlDatabase</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#addDatabase(com.trolltech.qt.sql.QSqlDriver, java.lang.String)">addDatabase</A></B>(<A HREF="../../../../com/trolltech/qt/sql/QSqlDriver.html" title="class in com.trolltech.qt.sql">QSqlDriver</A>&nbsp;driver,
            java.lang.String&nbsp;connectionName)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This function is useful if you need to set up the database connection and instantiate the driver yourself.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html" title="class in com.trolltech.qt.sql">QSqlDatabase</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#addDatabase(java.lang.String)">addDatabase</A></B>(java.lang.String&nbsp;type)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Equivalent to <a href="QSqlDatabase.html#addDatabase(com.trolltech.qt.sql.QSqlDriver, java.lang.String)"><tt>addDatabase</tt></a>(<tt>type</tt>, QLatin1String( defaultConnection )).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html" title="class in com.trolltech.qt.sql">QSqlDatabase</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#addDatabase(java.lang.String, java.lang.String)">addDatabase</A></B>(java.lang.String&nbsp;type,
            java.lang.String&nbsp;connectionName)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a database to the list of database connections using the driver <tt>type</tt> and the connection name <tt>connectionName</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html" title="class in com.trolltech.qt.sql">QSqlDatabase</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#cloneDatabase(com.trolltech.qt.sql.QSqlDatabase, java.lang.String)">cloneDatabase</A></B>(<A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html" title="class in com.trolltech.qt.sql">QSqlDatabase</A>&nbsp;other,
              java.lang.String&nbsp;connectionName)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Clones the database connection <tt>other</tt> and and stores it as <tt>connectionName</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#close()">close</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Closes the database connection, freeing any resources acquired, and invalidating any existing <a href="QSqlQuery.html"><tt>QSqlQuery</tt></a> objects that are used with the database.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#commit()">commit</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Commits a transaction to the database if the driver supports transactions and a <a href="QSqlDatabase.html#transaction()"><tt>transaction</tt></a> has been started.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.util.List&lt;java.lang.String&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#connectionNames()">connectionNames</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a list containing the names of all connections.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#connectOptions()">connectOptions</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the connection options string used for this connection.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#contains()">contains</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Equivalent to <a href="QSqlDatabase.html#contains(java.lang.String)">contains</tt></a>(QLatin1String( defaultConnection )).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#contains(java.lang.String)">contains</A></B>(java.lang.String&nbsp;connectionName)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if the list of database connections contains <tt>connectionName</tt>; otherwise returns false.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html" title="class in com.trolltech.qt.sql">QSqlDatabase</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#database()">database</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Equivalent to <a href="QSqlDatabase.html#database(java.lang.String, boolean)">database</tt></a>(QLatin1String( defaultConnection ), true).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html" title="class in com.trolltech.qt.sql">QSqlDatabase</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#database(java.lang.String)">database</A></B>(java.lang.String&nbsp;connectionName)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Equivalent to <a href="QSqlDatabase.html#database(java.lang.String, boolean)">database</tt></a>(<tt>connectionName</tt>, true).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html" title="class in com.trolltech.qt.sql">QSqlDatabase</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#database(java.lang.String, boolean)">database</A></B>(java.lang.String&nbsp;connectionName,
         boolean&nbsp;open)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the database connection called <tt>connectionName</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#databaseName()">databaseName</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the connection's database name; it may be empty.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#defaultConnection()">defaultConnection</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns this QSqlDatabase's default connection.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../com/trolltech/qt/sql/QSqlDriver.html" title="class in com.trolltech.qt.sql">QSqlDriver</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#driver()">driver</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the database driver used to access the database connection.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#driverName()">driverName</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the connection's driver name.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.util.List&lt;java.lang.String&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#drivers()">drivers</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a list of all the available database drivers.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../com/trolltech/qt/sql/QSqlQuery.html" title="class in com.trolltech.qt.sql">QSqlQuery</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#exec()">exec</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Equivalent to <a href="QSqlDatabase.html#exec(java.lang.String)">exec</tt></a>(QString()).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../com/trolltech/qt/sql/QSqlQuery.html" title="class in com.trolltech.qt.sql">QSqlQuery</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#exec(java.lang.String)">exec</A></B>(java.lang.String&nbsp;query)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Executes a SQL statement on the database and returns a <a href="QSqlQuery.html"><tt>QSqlQuery</tt></a> object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html" title="class in com.trolltech.qt.sql">QSqlDatabase</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#fromNativePointer(com.trolltech.qt.QNativePointer)">fromNativePointer</A></B>(<A HREF="../../../../com/trolltech/qt/QNativePointer.html" title="class in com.trolltech.qt">QNativePointer</A>&nbsp;nativePointer)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This function returns the QSqlDatabase instance pointed to by nativePointer</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#hostName()">hostName</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the connection's host name.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#isDriverAvailable(java.lang.String)">isDriverAvailable</A></B>(java.lang.String&nbsp;name)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if a driver called <tt>name</tt> is available; otherwise returns false.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#isOpen()">isOpen</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if the database connection is currently open; otherwise returns false.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#isOpenError()">isOpenError</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if there was an error opening the database connection; otherwise returns false.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#isValid()">isValid</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if the <a href="QSqlDatabase.html#QSqlDatabase()"><tt>QSqlDatabase</tt></a> has a valid driver.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../com/trolltech/qt/sql/QSqlError.html" title="class in com.trolltech.qt.sql">QSqlError</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#lastError()">lastError</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns information about the last error that occurred on the database.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../../com/trolltech/qt/QNativePointer.html" title="class in com.trolltech.qt">QNativePointer</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#nativePointerArray(com.trolltech.qt.sql.QSqlDatabase[])">nativePointerArray</A></B>(<A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html" title="class in com.trolltech.qt.sql">QSqlDatabase</A>[]&nbsp;array)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This function returns a QNativePointer that is pointing to the specified QSqlDatabase array.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#open()">open</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Opens the database connection using the current connection values.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#open(java.lang.String, java.lang.String)">open</A></B>(java.lang.String&nbsp;user,
     java.lang.String&nbsp;password)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Opens the database connection using the given <tt>user</tt> name and <tt>password</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#password()">password</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the connection's password.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#port()">port</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the connection's port number.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../com/trolltech/qt/sql/QSqlIndex.html" title="class in com.trolltech.qt.sql">QSqlIndex</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#primaryIndex(java.lang.String)">primaryIndex</A></B>(java.lang.String&nbsp;tablename)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the primary index for table <tt>tablename</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../com/trolltech/qt/sql/QSqlRecord.html" title="class in com.trolltech.qt.sql">QSqlRecord</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#record(java.lang.String)">record</A></B>(java.lang.String&nbsp;tablename)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a <a href="QSqlRecord.html"><tt>QSqlRecord</tt></a> populated with the names of all the fields in the table (or view) called <tt>tablename</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#registerSqlDriver(java.lang.String, com.trolltech.qt.sql.QSqlDriverCreatorBase)">registerSqlDriver</A></B>(java.lang.String&nbsp;name,
                  <A HREF="../../../../com/trolltech/qt/sql/QSqlDriverCreatorBase.html" title="class in com.trolltech.qt.sql">QSqlDriverCreatorBase</A>&nbsp;creator)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This function registers a new SQL driver called <tt>name</tt>, within the SQL framework.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#removeDatabase(java.lang.String)">removeDatabase</A></B>(java.lang.String&nbsp;connectionName)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes the database connection <tt>connectionName</tt> from the list of database connections.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#rollback()">rollback</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Rolls a transaction back on the database if the driver supports transactions and a <a href="QSqlDatabase.html#transaction()"><tt>transaction</tt></a> has been started.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#setConnectOptions()">setConnectOptions</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Equivalent to <a href="QSqlDatabase.html#setConnectOptions(java.lang.String)"><tt>setConnectOptions</tt></a>(QString()).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#setConnectOptions(java.lang.String)">setConnectOptions</A></B>(java.lang.String&nbsp;options)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets database-specific <tt>options</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#setDatabaseName(java.lang.String)">setDatabaseName</A></B>(java.lang.String&nbsp;name)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the connection's name to <tt>name</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#setHostName(java.lang.String)">setHostName</A></B>(java.lang.String&nbsp;host)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the connection's host name to <tt>host</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#setPassword(java.lang.String)">setPassword</A></B>(java.lang.String&nbsp;password)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the connection's password to <tt>password</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#setPort(int)">setPort</A></B>(int&nbsp;p)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the connection's port number to <tt>p</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#setUserName(java.lang.String)">setUserName</A></B>(java.lang.String&nbsp;name)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the connection's user name to <tt>name</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.List&lt;java.lang.String&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#tables()">tables</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This is an overloaded method provided for convenience.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.List&lt;java.lang.String&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#tables(com.trolltech.qt.sql.QSql.TableType)">tables</A></B>(<A HREF="../../../../com/trolltech/qt/sql/QSql.TableType.html" title="enum in com.trolltech.qt.sql">QSql.TableType</A>&nbsp;type)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a list of the database's tables, system tables and views, as specified by the parameter <tt>type</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#transaction()">transaction</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Begins a transaction on the database if the driver supports transactions.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html#userName()">userName</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the connection's user name; it may be empty.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_com.trolltech.qt.QtJambiObject"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class com.trolltech.qt.<A HREF="../../../../com/trolltech/qt/QtJambiObject.html" title="class in com.trolltech.qt">QtJambiObject</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../com/trolltech/qt/QtJambiObject.html#dispose()">dispose</A>, <A HREF="../../../../com/trolltech/qt/QtJambiObject.html#disposed()">disposed</A>, <A HREF="../../../../com/trolltech/qt/QtJambiObject.html#finalize()">finalize</A>, <A HREF="../../../../com/trolltech/qt/QtJambiObject.html#reassignNativeResources(com.trolltech.qt.QtJambiObject, java.lang.Class)">reassignNativeResources</A>, <A HREF="../../../../com/trolltech/qt/QtJambiObject.html#tr(java.lang.String)">tr</A>, <A HREF="../../../../com/trolltech/qt/QtJambiObject.html#tr(java.lang.String, java.lang.String)">tr</A>, <A HREF="../../../../com/trolltech/qt/QtJambiObject.html#tr(java.lang.String, java.lang.String, int)">tr</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_com.trolltech.qt.QSignalEmitter"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class com.trolltech.qt.<A HREF="../../../../com/trolltech/qt/QSignalEmitter.html" title="class in com.trolltech.qt">QSignalEmitter</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../com/trolltech/qt/QSignalEmitter.html#blockSignals(boolean)">blockSignals</A>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.html#disconnect()">disconnect</A>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.html#disconnect(java.lang.Object)">disconnect</A>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.html#signalsBlocked()">signalsBlocked</A>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.html#signalSender()">signalSender</A>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.html#thread()">thread</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_com.trolltech.qt.QtJambiInterface"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from interface com.trolltech.qt.<A HREF="../../../../com/trolltech/qt/QtJambiInterface.html" title="interface in com.trolltech.qt">QtJambiInterface</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../com/trolltech/qt/QtJambiInterface.html#disableGarbageCollection()">disableGarbageCollection</A>, <A HREF="../../../../com/trolltech/qt/QtJambiInterface.html#nativeId()">nativeId</A>, <A HREF="../../../../com/trolltech/qt/QtJambiInterface.html#nativePointer()">nativePointer</A>, <A HREF="../../../../com/trolltech/qt/QtJambiInterface.html#reenableGarbageCollection()">reenableGarbageCollection</A>, <A HREF="../../../../com/trolltech/qt/QtJambiInterface.html#setJavaOwnership()">setJavaOwnership</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="QSqlDatabase(com.trolltech.qt.sql.QSqlDriver)"><!-- --></A><H3>
QSqlDatabase</H3>
<PRE>
protected <B>QSqlDatabase</B>(<A HREF="../../../../com/trolltech/qt/sql/QSqlDriver.html" title="class in com.trolltech.qt.sql">QSqlDriver</A>&nbsp;driver)</PRE>
<DL>
<DD><p>Creates a database connection using the given <tt>driver</tt>.</p>
<P>
</DL>
<HR>

<A NAME="QSqlDatabase(com.trolltech.qt.sql.QSqlDatabase)"><!-- --></A><H3>
QSqlDatabase</H3>
<PRE>
public <B>QSqlDatabase</B>(<A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html" title="class in com.trolltech.qt.sql">QSqlDatabase</A>&nbsp;other)</PRE>
<DL>
<DD><p>Creates a copy of <tt>other</tt>.</p>
<P>
</DL>
<HR>

<A NAME="QSqlDatabase(java.lang.String)"><!-- --></A><H3>
QSqlDatabase</H3>
<PRE>
protected <B>QSqlDatabase</B>(java.lang.String&nbsp;type)</PRE>
<DL>
<DD><p>Creates a <a href="QSqlDatabase.html#QSqlDatabase()"><tt>QSqlDatabase</tt></a> connection that uses the driver referred to by <tt>type</tt>. If the <tt>type</tt> is not recognized, the database connection will have no functionality.</p>
<p>The currently available driver types are:</p>
<p><table align="center" cellpadding="2" cellspacing="1" border="0">
<thead><tr valign="top" class="qt-style"><th>Driver Type</th><th>Description</th></tr></thead>
<tr valign="top" class="odd"><td>QDB2</td><td>IBM DB2</td></tr>
<tr valign="top" class="even"><td>QIBASE</td><td>Borland InterBase Driver</td></tr>
<tr valign="top" class="odd"><td>QMYSQL</td><td>MySQL Driver</td></tr>
<tr valign="top" class="even"><td>QOCI</td><td>Oracle Call Interface Driver</td></tr>
<tr valign="top" class="odd"><td>QODBC</td><td>ODBC Driver (includes Microsoft SQL Server)</td></tr>
<tr valign="top" class="even"><td>QPSQL</td><td>PostgreSQL Driver</td></tr>
<tr valign="top" class="odd"><td>QSQLITE</td><td><a href="%2E%2E/3rdparty.html#sqlite"><tt>SQLite</tt></a> version 3 or above</td></tr>
<tr valign="top" class="even"><td>QSQLITE2</td><td><a href="%2E%2E/3rdparty.html#sqlite"><tt>SQLite</tt></a> version 2</td></tr>
<tr valign="top" class="odd"><td>QTDS</td><td>Sybase Adaptive Server</td></tr>
</table></p>
<p>Additional third party drivers, including your own custom drivers, can be loaded dynamically.</p>
<P>
<DL>
<DT><B>See Also:</B><DD><a href="%2E%2E/sql-driver.html">SQL Database Drivers</tt></a>, 
<a href="QSqlDatabase.html#registerSqlDriver(java.lang.String, com.trolltech.qt.sql.QSqlDriverCreatorBase)"><tt>registerSqlDriver</tt></a>, 
<a href="QSqlDatabase.html#drivers()"><tt>drivers</tt></a></DL>
</DL>
<HR>

<A NAME="QSqlDatabase()"><!-- --></A><H3>
QSqlDatabase</H3>
<PRE>
public <B>QSqlDatabase</B>()</PRE>
<DL>
<DD><p>Creates an empty, invalid <a href="QSqlDatabase.html#QSqlDatabase()"><tt>QSqlDatabase</tt></a> object. Use <a href="QSqlDatabase.html#addDatabase(com.trolltech.qt.sql.QSqlDriver, java.lang.String)"><tt>addDatabase</tt></a>, <a href="QSqlDatabase.html#removeDatabase(java.lang.String)"><tt>removeDatabase</tt></a>, and <a href="QSqlDatabase.html#database(java.lang.String, boolean)"><tt>database</tt></a> to get valid <a href="QSqlDatabase.html#QSqlDatabase()"><tt>QSqlDatabase</tt></a> objects.</p>
<P>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="close()"><!-- --></A><H3>
close</H3>
<PRE>
public final void <B>close</B>()</PRE>
<DL>
<DD><p>Closes the database connection, freeing any resources acquired, and invalidating any existing <a href="QSqlQuery.html"><tt>QSqlQuery</tt></a> objects that are used with the database.</p>
<p>This will also affect copies of this <a href="QSqlDatabase.html#QSqlDatabase()"><tt>QSqlDatabase</tt></a> object.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlDatabase.html#removeDatabase(java.lang.String)"><tt>removeDatabase</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="commit()"><!-- --></A><H3>
commit</H3>
<PRE>
public final boolean <B>commit</B>()</PRE>
<DL>
<DD><p>Commits a transaction to the database if the driver supports transactions and a <a href="QSqlDatabase.html#transaction()"><tt>transaction</tt></a> has been started. Returns true if the operation succeeded; otherwise returns false.</p>
<p>Note that on some databases, this function will not work if there is an active <a href="QSqlQuery.html"><tt>QSqlQuery</tt></a> on the database. Use the <a href="QSqlDatabase.html#lastError()"><tt>lastError</tt></a> function to retrieve database-specific error data about the error that occurred.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><tt>QSqlDriver::hasFeature</tt>, 
<a href="QSqlDatabase.html#rollback()"><tt>rollback</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="connectOptions()"><!-- --></A><H3>
connectOptions</H3>
<PRE>
public final java.lang.String <B>connectOptions</B>()</PRE>
<DL>
<DD><p>Returns the connection options string used for this connection. The string may be empty.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlDatabase.html#setConnectOptions(java.lang.String)"><tt>setConnectOptions</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="databaseName()"><!-- --></A><H3>
databaseName</H3>
<PRE>
public final java.lang.String <B>databaseName</B>()</PRE>
<DL>
<DD><p>Returns the connection's database name; it may be empty.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlDatabase.html#setDatabaseName(java.lang.String)"><tt>setDatabaseName</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="driver()"><!-- --></A><H3>
driver</H3>
<PRE>
public final <A HREF="../../../../com/trolltech/qt/sql/QSqlDriver.html" title="class in com.trolltech.qt.sql">QSqlDriver</A> <B>driver</B>()</PRE>
<DL>
<DD><p>Returns the database driver used to access the database connection.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlDatabase.html#addDatabase(com.trolltech.qt.sql.QSqlDriver, java.lang.String)"><tt>addDatabase</tt></a>, 
<a href="QSqlDatabase.html#drivers()"><tt>drivers</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="driverName()"><!-- --></A><H3>
driverName</H3>
<PRE>
public final java.lang.String <B>driverName</B>()</PRE>
<DL>
<DD><p>Returns the connection's driver name.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlDatabase.html#addDatabase(com.trolltech.qt.sql.QSqlDriver, java.lang.String)"><tt>addDatabase</tt></a>, 
<a href="QSqlDatabase.html#driver()"><tt>driver</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="exec()"><!-- --></A><H3>
exec</H3>
<PRE>
public final <A HREF="../../../../com/trolltech/qt/sql/QSqlQuery.html" title="class in com.trolltech.qt.sql">QSqlQuery</A> <B>exec</B>()</PRE>
<DL>
<DD><p>Equivalent to <a href="QSqlDatabase.html#exec(java.lang.String)">exec</tt></a>(QString()).
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="exec(java.lang.String)"><!-- --></A><H3>
exec</H3>
<PRE>
public final <A HREF="../../../../com/trolltech/qt/sql/QSqlQuery.html" title="class in com.trolltech.qt.sql">QSqlQuery</A> <B>exec</B>(java.lang.String&nbsp;query)</PRE>
<DL>
<DD><p>Executes a SQL statement on the database and returns a <a href="QSqlQuery.html"><tt>QSqlQuery</tt></a> object. Use <a href="QSqlDatabase.html#lastError()"><tt>lastError</tt></a> to retrieve error information. If <tt>query</tt> is empty, an empty, invalid query is returned and <a href="QSqlDatabase.html#lastError()"><tt>lastError</tt></a> is not affected.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlQuery.html"><tt>QSqlQuery</tt></a>, 
<a href="QSqlDatabase.html#lastError()"><tt>lastError</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="hostName()"><!-- --></A><H3>
hostName</H3>
<PRE>
public final java.lang.String <B>hostName</B>()</PRE>
<DL>
<DD><p>Returns the connection's host name. It may be empty.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlDatabase.html#setHostName(java.lang.String)"><tt>setHostName</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="isOpen()"><!-- --></A><H3>
isOpen</H3>
<PRE>
public final boolean <B>isOpen</B>()</PRE>
<DL>
<DD><p>Returns true if the database connection is currently open; otherwise returns false.</p>
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="isOpenError()"><!-- --></A><H3>
isOpenError</H3>
<PRE>
public final boolean <B>isOpenError</B>()</PRE>
<DL>
<DD><p>Returns true if there was an error opening the database connection; otherwise returns false. Error information can be retrieved using the <a href="QSqlDatabase.html#lastError()"><tt>lastError</tt></a> function.</p>
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="isValid()"><!-- --></A><H3>
isValid</H3>
<PRE>
public final boolean <B>isValid</B>()</PRE>
<DL>
<DD><p>Returns true if the <a href="QSqlDatabase.html#QSqlDatabase()"><tt>QSqlDatabase</tt></a> has a valid driver.</p>
<p>Example:</p>
<pre>    QSqlDatabase db;
    qDebug() &lt;&lt; db.isValid();    <span class="comment">// Returns false</span>

    db = QSqlDatabase::database(&quot;sales&quot;);
    qDebug() &lt;&lt; db.isValid();    <span class="comment">// Returns true if &quot;sales&quot; connection exists</span>

    QSqlDatabase::removeDatabase(&quot;sales&quot;);
    qDebug() &lt;&lt; db.isValid();    <span class="comment">// Returns false</span></pre>
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="lastError()"><!-- --></A><H3>
lastError</H3>
<PRE>
public final <A HREF="../../../../com/trolltech/qt/sql/QSqlError.html" title="class in com.trolltech.qt.sql">QSqlError</A> <B>lastError</B>()</PRE>
<DL>
<DD><p>Returns information about the last error that occurred on the database.</p>
<p>Failures that occur in conjunction with an individual query are reported by QSqlQuery::lastError().</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlError.html"><tt>QSqlError</tt></a>, 
<tt>QSqlQuery::lastError</tt></DL>
</DD>
</DL>
<HR>

<A NAME="open()"><!-- --></A><H3>
open</H3>
<PRE>
public final boolean <B>open</B>()</PRE>
<DL>
<DD><p>Opens the database connection using the current connection values. Returns true on success; otherwise returns false. Error information can be retrieved using <a href="QSqlDatabase.html#lastError()"><tt>lastError</tt></a>.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlDatabase.html#lastError()"><tt>lastError</tt></a>, 
<a href="QSqlDatabase.html#setDatabaseName(java.lang.String)"><tt>setDatabaseName</tt></a>, 
<a href="QSqlDatabase.html#setUserName(java.lang.String)"><tt>setUserName</tt></a>, 
<a href="QSqlDatabase.html#setPassword(java.lang.String)"><tt>setPassword</tt></a>, 
<a href="QSqlDatabase.html#setHostName(java.lang.String)"><tt>setHostName</tt></a>, 
<a href="QSqlDatabase.html#setPort(int)"><tt>setPort</tt></a>, 
<a href="QSqlDatabase.html#setConnectOptions(java.lang.String)"><tt>setConnectOptions</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="open(java.lang.String, java.lang.String)"><!-- --></A><H3>
open</H3>
<PRE>
public final boolean <B>open</B>(java.lang.String&nbsp;user,
                          java.lang.String&nbsp;password)</PRE>
<DL>
<DD><p>Opens the database connection using the given <tt>user</tt> name and <tt>password</tt>. Returns true on success; otherwise returns false. Error information can be retrieved using the <a href="QSqlDatabase.html#lastError()"><tt>lastError</tt></a> function.</p>
<p>This function does not store the password it is given. Instead, the password is passed directly to the driver for opening the connection and it is then discarded.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlDatabase.html#lastError()"><tt>lastError</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="password()"><!-- --></A><H3>
password</H3>
<PRE>
public final java.lang.String <B>password</B>()</PRE>
<DL>
<DD><p>Returns the connection's password. If the password was not set with <a href="QSqlDatabase.html#setPassword(java.lang.String)"><tt>setPassword</tt></a>, and if the password was given in the <a href="QSqlDatabase.html#open(java.lang.String, java.lang.String)"><tt>open</tt></a> call, or if no password was used, an empty string is returned.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlDatabase.html#setPassword(java.lang.String)"><tt>setPassword</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="port()"><!-- --></A><H3>
port</H3>
<PRE>
public final int <B>port</B>()</PRE>
<DL>
<DD><p>Returns the connection's port number. The value is undefined if the port number has not been set.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlDatabase.html#setPort(int)"><tt>setPort</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="primaryIndex(java.lang.String)"><!-- --></A><H3>
primaryIndex</H3>
<PRE>
public final <A HREF="../../../../com/trolltech/qt/sql/QSqlIndex.html" title="class in com.trolltech.qt.sql">QSqlIndex</A> <B>primaryIndex</B>(java.lang.String&nbsp;tablename)</PRE>
<DL>
<DD><p>Returns the primary index for table <tt>tablename</tt>. If no primary index exists an empty <a href="QSqlIndex.html"><tt>QSqlIndex</tt></a> is returned.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlDatabase.html#tables(com.trolltech.qt.sql.QSql.TableType)"><tt>tables</tt></a>, 
<a href="QSqlDatabase.html#record(java.lang.String)"><tt>record</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="record(java.lang.String)"><!-- --></A><H3>
record</H3>
<PRE>
public final <A HREF="../../../../com/trolltech/qt/sql/QSqlRecord.html" title="class in com.trolltech.qt.sql">QSqlRecord</A> <B>record</B>(java.lang.String&nbsp;tablename)</PRE>
<DL>
<DD><p>Returns a <a href="QSqlRecord.html"><tt>QSqlRecord</tt></a> populated with the names of all the fields in the table (or view) called <tt>tablename</tt>. The order in which the fields appear in the record is undefined. If no such table (or view) exists, an empty record is returned.</p>
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="rollback()"><!-- --></A><H3>
rollback</H3>
<PRE>
public final boolean <B>rollback</B>()</PRE>
<DL>
<DD><p>Rolls a transaction back on the database if the driver supports transactions and a <a href="QSqlDatabase.html#transaction()"><tt>transaction</tt></a> has been started. Returns true if the operation succeeded; otherwise returns false.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><tt>QSqlDriver::hasFeature</tt>, 
<a href="QSqlDatabase.html#commit()"><tt>commit</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="setConnectOptions()"><!-- --></A><H3>
setConnectOptions</H3>
<PRE>
public final void <B>setConnectOptions</B>()</PRE>
<DL>
<DD><p>Equivalent to <a href="QSqlDatabase.html#setConnectOptions(java.lang.String)"><tt>setConnectOptions</tt></a>(QString()).
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="setConnectOptions(java.lang.String)"><!-- --></A><H3>
setConnectOptions</H3>
<PRE>
public final void <B>setConnectOptions</B>(java.lang.String&nbsp;options)</PRE>
<DL>
<DD><p>Sets database-specific <tt>options</tt>. This must be done before the connection is opened or it has no effect (or you can <a href="QSqlDatabase.html#close()"><tt>close</tt></a> the connection, call this function and <a href="QSqlDatabase.html#open(java.lang.String, java.lang.String)"><tt>open</tt></a> the connection again).</p>
<p>The format of the <tt>options</tt> string is a semicolon separated list of option names or option=value pairs. The options depend on the database client used:</p>
<p><table align="center" cellpadding="2" cellspacing="1" border="0">
<thead><tr valign="top" class="qt-style"><th>ODBC</th><th>MySQL</th><th>PostgreSQL</th></tr></thead>
<tr valign="top" class="odd"><td><ul>
<li>SQL_ATTR_ACCESS_MODE</li>
<li>SQL_ATTR_LOGIN_TIMEOUT</li>
<li>SQL_ATTR_CONNECTION_TIMEOUT</li>
<li>SQL_ATTR_CURRENT_CATALOG</li>
<li>SQL_ATTR_METADATA_ID</li>
<li>SQL_ATTR_PACKET_SIZE</li>
<li>SQL_ATTR_TRACEFILE</li>
<li>SQL_ATTR_TRACE</li>
<li>SQL_ATTR_CONNECTION_POOLING</li>
</ul>
</td><td><ul>
<li>CLIENT_COMPRESS</li>
<li>CLIENT_FOUND_ROWS</li>
<li>CLIENT_IGNORE_SPACE</li>
<li>CLIENT_SSL</li>
<li>CLIENT_ODBC</li>
<li>CLIENT_NO_SCHEMA</li>
<li>CLIENT_INTERACTIVE</li>
<li>UNIX_SOCKET</li>
</ul>
</td><td><ul>
<li>connect_timeout</li>
<li>options</li>
<li>tty</li>
<li>requiressl</li>
<li>service</li>
</ul>
</td></tr>
<thead><tr valign="top" class="qt-style"><th>DB2</th><th>OCI</th><th>TDS</th></tr></thead>
<tr valign="top" class="even"><td><ul>
<li>SQL_ATTR_ACCESS_MODE</li>
<li>SQL_ATTR_LOGIN_TIMEOUT</li>
</ul>
</td><td><ul>
<li>OCI_ATTR_PREFETCH_ROWS</li>
<li>OCI_ATTR_PREFETCH_MEMORY</li>
</ul>
</td><td><i>none</i></td></tr>
<thead><tr valign="top" class="qt-style"><th><a href="%2E%2E/3rdparty.html#sqlite"><tt>SQLite</tt></a></th><th>Interbase</th></tr></thead>
<tr valign="top" class="odd"><td><ul>
<li>QSQLITE_BUSY_TIMEOUT</li>
</ul>
</td><td><ul>
<li>ISC_DPB_LC_CTYPE</li>
<li>ISC_DPB_SQL_ROLE_NAME</li>
</ul>
</td></tr>
</table></p>
<p>Examples:</p>
<pre>    ...
<span class="comment">    // MySQL connection</span>
    db.setConnectOptions(&quot;CLIENT_SSL=1;CLIENT_IGNORE_SPACE=1&quot;); <span class="comment">// use an SSL connection to the server</span>
    if (!db.open()) {
        db.setConnectOptions(); <span class="comment">// clears the connect option string</span>
        ...
    }
    ...
<span class="comment">    // PostgreSQL connection</span>
    db.setConnectOptions(&quot;requiressl=1&quot;); <span class="comment">// enable PostgreSQL SSL connections</span>
    if (!db.open()) {
        db.setConnectOptions(); <span class="comment">// clear options</span>
        ...
    }
    ...
<span class="comment">    // ODBC connection</span>
    db.setConnectOptions(&quot;SQL_ATTR_ACCESS_MODE=SQL_MODE_READ_ONLY;SQL_ATTR_TRACE=SQL_OPT_TRACE_ON&quot;); <span class="comment">// set ODBC options</span>
    if (!db.open()) {
        db.setConnectOptions(); <span class="comment">// don't try to set this option</span>
        ...
    }</pre>
<p>Refer to the client library documentation for more information about the different options.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlDatabase.html#connectOptions()"><tt>connectOptions</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="setDatabaseName(java.lang.String)"><!-- --></A><H3>
setDatabaseName</H3>
<PRE>
public final void <B>setDatabaseName</B>(java.lang.String&nbsp;name)</PRE>
<DL>
<DD><p>Sets the connection's name to <tt>name</tt>. This must be done before the connection is opened or it has no effect; (or you can <a href="QSqlDatabase.html#close()"><tt>close</tt></a> the connection, call this function and <a href="QSqlDatabase.html#open(java.lang.String, java.lang.String)"><tt>open</tt></a> the connection again). The name is database-specific.</p>
<p>For the QOCI (Oracle) driver, the database name is the TNS Service Name.</p>
<p>For the QODBC driver, the <tt>name</tt> can either be a DSN, a DSN filename (in which case the file must have a <tt>.dsn</tt> extension), or a connection string.</p>
<p>For example, Microsoft Access users can use the following connection string to open an <tt>.mdb</tt> file directly, instead of having to create a DSN entry in the ODBC manager:</p>
<pre>    ...
    db = QSqlDatabase::addDatabase(&quot;QODBC&quot;);
    db.setDatabaseName(&quot;DRIVER={Microsoft Access Driver (*.mdb)};FIL={MS Access};DBQ=myaccessfile.mdb&quot;);
    if (db.open()) {
        <span class="comment">// success!</span>
    }
    ...</pre>
<p>There is no default value.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlDatabase.html#databaseName()"><tt>databaseName</tt></a>, 
<a href="QSqlDatabase.html#setUserName(java.lang.String)"><tt>setUserName</tt></a>, 
<a href="QSqlDatabase.html#setPassword(java.lang.String)"><tt>setPassword</tt></a>, 
<a href="QSqlDatabase.html#setHostName(java.lang.String)"><tt>setHostName</tt></a>, 
<a href="QSqlDatabase.html#setPort(int)"><tt>setPort</tt></a>, 
<a href="QSqlDatabase.html#setConnectOptions(java.lang.String)"><tt>setConnectOptions</tt></a>, 
<a href="QSqlDatabase.html#open(java.lang.String, java.lang.String)"><tt>open</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="setHostName(java.lang.String)"><!-- --></A><H3>
setHostName</H3>
<PRE>
public final void <B>setHostName</B>(java.lang.String&nbsp;host)</PRE>
<DL>
<DD><p>Sets the connection's host name to <tt>host</tt>. This must be done before the connection is opened or it has no effect (or you can <a href="QSqlDatabase.html#close()"><tt>close</tt></a> the connection, call this function and <a href="QSqlDatabase.html#open(java.lang.String, java.lang.String)"><tt>open</tt></a> the connection again).</p>
<p>There is no default value.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlDatabase.html#hostName()"><tt>hostName</tt></a>, 
<a href="QSqlDatabase.html#setUserName(java.lang.String)"><tt>setUserName</tt></a>, 
<a href="QSqlDatabase.html#setPassword(java.lang.String)"><tt>setPassword</tt></a>, 
<a href="QSqlDatabase.html#setDatabaseName(java.lang.String)"><tt>setDatabaseName</tt></a>, 
<a href="QSqlDatabase.html#setPort(int)"><tt>setPort</tt></a>, 
<a href="QSqlDatabase.html#setConnectOptions(java.lang.String)"><tt>setConnectOptions</tt></a>, 
<a href="QSqlDatabase.html#open(java.lang.String, java.lang.String)"><tt>open</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="setPassword(java.lang.String)"><!-- --></A><H3>
setPassword</H3>
<PRE>
public final void <B>setPassword</B>(java.lang.String&nbsp;password)</PRE>
<DL>
<DD><p>Sets the connection's password to <tt>password</tt>. This must be done before the connection is opened or it has no effect (or you can <a href="QSqlDatabase.html#close()"><tt>close</tt></a> the connection, call this function and <a href="QSqlDatabase.html#open(java.lang.String, java.lang.String)"><tt>open</tt></a> the connection again).</p>
<p>There is no default value.</p>
<p><b>Warning:</b> This function stores the password in plain text within Qt. Use the <a href="QSqlDatabase.html#open(java.lang.String, java.lang.String)"><tt>open</tt></a> call that takes a password as parameter to avoid this behavior.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlDatabase.html#password()"><tt>password</tt></a>, 
<a href="QSqlDatabase.html#setUserName(java.lang.String)"><tt>setUserName</tt></a>, 
<a href="QSqlDatabase.html#setDatabaseName(java.lang.String)"><tt>setDatabaseName</tt></a>, 
<a href="QSqlDatabase.html#setHostName(java.lang.String)"><tt>setHostName</tt></a>, 
<a href="QSqlDatabase.html#setPort(int)"><tt>setPort</tt></a>, 
<a href="QSqlDatabase.html#setConnectOptions(java.lang.String)"><tt>setConnectOptions</tt></a>, 
<a href="QSqlDatabase.html#open(java.lang.String, java.lang.String)"><tt>open</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="setPort(int)"><!-- --></A><H3>
setPort</H3>
<PRE>
public final void <B>setPort</B>(int&nbsp;p)</PRE>
<DL>
<DD><p>Sets the connection's port number to <tt>p</tt>. This must be done before the connection is opened or it has no effect (or you can <a href="QSqlDatabase.html#close()"><tt>close</tt></a> the connection, call this function and <a href="QSqlDatabase.html#open(java.lang.String, java.lang.String)"><tt>open</tt></a> the connection again).</p>
<p>There is no default value.</p>
<p><a href="QSqlDatabase.html#setDatabaseName(java.lang.String)"><tt>setDatabaseName</tt></a> <a href="QSqlDatabase.html#setConnectOptions(java.lang.String)"><tt>setConnectOptions</tt></a> <a href="QSqlDatabase.html#open(java.lang.String, java.lang.String)"><tt>open</tt></a></p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlDatabase.html#port()"><tt>port</tt></a>, 
<a href="QSqlDatabase.html#setUserName(java.lang.String)"><tt>setUserName</tt></a>, 
<a href="QSqlDatabase.html#setPassword(java.lang.String)"><tt>setPassword</tt></a>, 
<a href="QSqlDatabase.html#setHostName(java.lang.String)"><tt>setHostName</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="setUserName(java.lang.String)"><!-- --></A><H3>
setUserName</H3>
<PRE>
public final void <B>setUserName</B>(java.lang.String&nbsp;name)</PRE>
<DL>
<DD><p>Sets the connection's user name to <tt>name</tt>. This must be done before the connection is opened or it has no effect (or you can <a href="QSqlDatabase.html#close()"><tt>close</tt></a> the connection, call this function and <a href="QSqlDatabase.html#open(java.lang.String, java.lang.String)"><tt>open</tt></a> the connection again).</p>
<p>There is no default value.</p>
<p><a href="QSqlDatabase.html#setPort(int)"><tt>setPort</tt></a> <a href="QSqlDatabase.html#setConnectOptions(java.lang.String)"><tt>setConnectOptions</tt></a> <a href="QSqlDatabase.html#open(java.lang.String, java.lang.String)"><tt>open</tt></a></p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlDatabase.html#userName()"><tt>userName</tt></a>, 
<a href="QSqlDatabase.html#setDatabaseName(java.lang.String)"><tt>setDatabaseName</tt></a>, 
<a href="QSqlDatabase.html#setPassword(java.lang.String)"><tt>setPassword</tt></a>, 
<a href="QSqlDatabase.html#setHostName(java.lang.String)"><tt>setHostName</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="tables()"><!-- --></A><H3>
tables</H3>
<PRE>
public final java.util.List&lt;java.lang.String&gt; <B>tables</B>()</PRE>
<DL>
<DD>This is an overloaded method provided for convenience.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="tables(com.trolltech.qt.sql.QSql.TableType)"><!-- --></A><H3>
tables</H3>
<PRE>
public final java.util.List&lt;java.lang.String&gt; <B>tables</B>(<A HREF="../../../../com/trolltech/qt/sql/QSql.TableType.html" title="enum in com.trolltech.qt.sql">QSql.TableType</A>&nbsp;type)</PRE>
<DL>
<DD><p>Returns a list of the database's tables, system tables and views, as specified by the parameter <tt>type</tt>.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlDatabase.html#primaryIndex(java.lang.String)"><tt>primaryIndex</tt></a>, 
<a href="QSqlDatabase.html#record(java.lang.String)"><tt>record</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="transaction()"><!-- --></A><H3>
transaction</H3>
<PRE>
public final boolean <B>transaction</B>()</PRE>
<DL>
<DD><p>Begins a transaction on the database if the driver supports transactions. Returns true if the operation succeeded; otherwise returns false.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><tt>QSqlDriver::hasFeature</tt>, 
<a href="QSqlDatabase.html#commit()"><tt>commit</tt></a>, 
<a href="QSqlDatabase.html#rollback()"><tt>rollback</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="userName()"><!-- --></A><H3>
userName</H3>
<PRE>
public final java.lang.String <B>userName</B>()</PRE>
<DL>
<DD><p>Returns the connection's user name; it may be empty.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlDatabase.html#setUserName(java.lang.String)"><tt>setUserName</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="addDatabase(java.lang.String)"><!-- --></A><H3>
addDatabase</H3>
<PRE>
public static <A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html" title="class in com.trolltech.qt.sql">QSqlDatabase</A> <B>addDatabase</B>(java.lang.String&nbsp;type)</PRE>
<DL>
<DD><p>Equivalent to <a href="QSqlDatabase.html#addDatabase(com.trolltech.qt.sql.QSqlDriver, java.lang.String)"><tt>addDatabase</tt></a>(<tt>type</tt>, QLatin1String( defaultConnection )).
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="addDatabase(java.lang.String, java.lang.String)"><!-- --></A><H3>
addDatabase</H3>
<PRE>
public static <A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html" title="class in com.trolltech.qt.sql">QSqlDatabase</A> <B>addDatabase</B>(java.lang.String&nbsp;type,
                                       java.lang.String&nbsp;connectionName)</PRE>
<DL>
<DD><p>Adds a database to the list of database connections using the driver <tt>type</tt> and the connection name <tt>connectionName</tt>. If there already exists a database connection called <tt>connectionName</tt>, that connection is removed.</p>
<p>The database connection is referred to by <tt>connectionName</tt>. The newly added database connection is returned.</p>
<p>If <tt>connectionName</tt> is not specified, the newly added database connection becomes the default database connection for the application, and subsequent calls to <a href="QSqlDatabase.html#database(java.lang.String, boolean)"><tt>database</tt></a> without a database name parameter will return a reference to it. If <tt>connectionName</tt> is given, use database(<tt>connectionName</tt>) to retrieve a pointer to the database connection.</p>
<p><b>Warning:</b> If you add a database with the same name as an existing database, the new database will replace the old one. This will happen automatically if you call this function more than once without specifying <tt>connectionName</tt>.</p>
<p>To make use of the connection, you will need to set it up, for example by calling some or all of <a href="QSqlDatabase.html#setDatabaseName(java.lang.String)"><tt>setDatabaseName</tt></a>, <a href="QSqlDatabase.html#setUserName(java.lang.String)"><tt>setUserName</tt></a>, <a href="QSqlDatabase.html#setPassword(java.lang.String)"><tt>setPassword</tt></a>, <a href="QSqlDatabase.html#setHostName(java.lang.String)"><tt>setHostName</tt></a>, <a href="QSqlDatabase.html#setPort(int)"><tt>setPort</tt></a>, and <a href="QSqlDatabase.html#setConnectOptions(java.lang.String)"><tt>setConnectOptions</tt></a>, and then you'll need to <a href="QSqlDatabase.html#open(java.lang.String, java.lang.String)"><tt>open</tt></a> the connection.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlDatabase.html#database(java.lang.String, boolean)"><tt>database</tt></a>, 
<a href="QSqlDatabase.html#removeDatabase(java.lang.String)"><tt>removeDatabase</tt></a>, 
<a href="%2E%2E/threads.html#threads-and-the-sql-module">Threads and the SQL Module</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="addDatabase(com.trolltech.qt.sql.QSqlDriver)"><!-- --></A><H3>
addDatabase</H3>
<PRE>
public static <A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html" title="class in com.trolltech.qt.sql">QSqlDatabase</A> <B>addDatabase</B>(<A HREF="../../../../com/trolltech/qt/sql/QSqlDriver.html" title="class in com.trolltech.qt.sql">QSqlDriver</A>&nbsp;driver)</PRE>
<DL>
<DD><p>Equivalent to <a href="QSqlDatabase.html#addDatabase(com.trolltech.qt.sql.QSqlDriver, java.lang.String)"><tt>addDatabase</tt></a>(<tt>driver</tt>, QLatin1String( defaultConnection )).
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="addDatabase(com.trolltech.qt.sql.QSqlDriver, java.lang.String)"><!-- --></A><H3>
addDatabase</H3>
<PRE>
public static <A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html" title="class in com.trolltech.qt.sql">QSqlDatabase</A> <B>addDatabase</B>(<A HREF="../../../../com/trolltech/qt/sql/QSqlDriver.html" title="class in com.trolltech.qt.sql">QSqlDriver</A>&nbsp;driver,
                                       java.lang.String&nbsp;connectionName)</PRE>
<DL>
<DD><p>This function is useful if you need to set up the database connection and instantiate the driver yourself. If you do this, it is recommended that you include the driver code in your own application. For example, setting up a custom PostgreSQL connection and instantiating the QPSQL driver can be done like this:</p>
<pre>    #include &quot;qtdir/src/sql/drivers/psql/qsql_psql.cpp&quot;</pre>
<p>(We assume that <tt>qtdir</tt> is the directory where Qt is installed.) This will pull in the code that is needed to use the PostgreSQL client library and to instantiate a QPSQLDriver object, assuming that you have the PostgreSQL headers somewhere in your include search path.</p>
<pre>    PGconn *con = PQconnectdb(&quot;host=server user=bart password=simpson dbname=springfield&quot;);
    QPSQLDriver *drv =  new QPSQLDriver(con);
    QSqlDatabase db = QSqlDatabase::addDatabase(drv); <span class="comment">// becomes the new default connection</span>
    QSqlQuery query;
    query.exec(&quot;SELECT NAME, ID FROM STAFF&quot;);
    ...</pre>
<p>The above code sets up a PostgreSQL connection and instantiates a QPSQLDriver object. Next, <a href="QSqlDatabase.html#addDatabase(com.trolltech.qt.sql.QSqlDriver, java.lang.String)"><tt>addDatabase</tt></a> is called to add the connection to the known connections so that it can be used by the Qt SQL classes. When a driver is instantiated with a connection handle (or set of handles), Qt assumes that you have already opened the database connection.</p>
<p>Remember that you must link your application against the database client library as well. The simplest way to do this is to add lines like the ones below to your <tt>.pro</tt> file:</p>
<pre>    unix:LIBS += -lpq
    win32:LIBS += libpqdll.lib</pre>
<p>You will need to have the client library in your linker's search path.</p>
<p>The method described above will work for all the drivers, the only difference is the arguments the driver constructors take. Below is an overview of the drivers and their constructor arguments.</p>
<p><table align="center" cellpadding="2" cellspacing="1" border="0">
<thead><tr valign="top" class="qt-style"><th>Driver</th><th>Class name</th><th>Constructor arguments</th><th>File to include</th></tr></thead>
<tr valign="top" class="odd"><td>QPSQL</td><td>QPSQLDriver</td><td>PGconn *connection</td><td><tt>qsql_psql.cpp</tt></td></tr>
<tr valign="top" class="even"><td>QMYSQL</td><td>QMYSQLDriver</td><td>MYSQL *connection</td><td><tt>qsql_mysql.cpp</tt></td></tr>
<tr valign="top" class="odd"><td>QOCI</td><td>QOCIDriver</td><td>OCIEnv *environment, OCISvcCtx *serviceContext</td><td><tt>qsql_oci.cpp</tt></td></tr>
<tr valign="top" class="even"><td>QODBC</td><td>QODBCDriver</td><td>SQLHANDLE environment, SQLHANDLE connection</td><td><tt>qsql_odbc.cpp</tt></td></tr>
<tr valign="top" class="odd"><td>QDB2</td><td>QDB2</td><td>SQLHANDLE environment, SQLHANDLE connection</td><td><tt>qsql_db2.cpp</tt></td></tr>
<tr valign="top" class="even"><td>QTDS</td><td>QTDSDriver</td><td>LOGINREC *loginRecord, DBPROCESS *dbProcess, const <a href="%2E%2E/porting4.html#qstring"><tt>QString</tt></a> &amp;<a href="QSqlDatabase.html#hostName()"><tt>hostName</tt></a></td><td><tt>qsql_tds.cpp</tt></td></tr>
<tr valign="top" class="odd"><td>QSQLITE</td><td>QSQLiteDriver</td><td>sqlite *connection</td><td><tt>qsql_sqlite.cpp</tt></td></tr>
<tr valign="top" class="even"><td>QIBASE</td><td>QIBaseDriver</td><td>isc_db_handle connection</td><td><tt>qsql_ibase.cpp</tt></td></tr>
</table></p>
<p>The host name (or service name) is needed when constructing the QTDSDriver for creating new connections for internal queries. This is to prevent the simultaneous usage of several <a href="QSqlQuery.html"><tt>QSqlQuery</tt></a>/<a href="%2E%2E/porting4.html#qsqlcursor"><tt>QSqlCursor</tt></a> objects from blocking each other.</p>
<p><b>Warning:</b> If you add a database with the same name as an existing database, the new database will replace the old one.</p>
<p><b>Warning:</b> The SQL framework takes ownership of the <tt>driver</tt> pointer, and it should not be deleted. If you want to explicitly remove the connection, use <a href="QSqlDatabase.html#removeDatabase(java.lang.String)"><tt>removeDatabase</tt></a>.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlDatabase.html#drivers()"><tt>drivers</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="cloneDatabase(com.trolltech.qt.sql.QSqlDatabase, java.lang.String)"><!-- --></A><H3>
cloneDatabase</H3>
<PRE>
public static <A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html" title="class in com.trolltech.qt.sql">QSqlDatabase</A> <B>cloneDatabase</B>(<A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html" title="class in com.trolltech.qt.sql">QSqlDatabase</A>&nbsp;other,
                                         java.lang.String&nbsp;connectionName)</PRE>
<DL>
<DD><p>Clones the database connection <tt>other</tt> and and stores it as <tt>connectionName</tt>. All the settings from the original database, e.g&#x2e; <a href="QSqlDatabase.html#databaseName()"><tt>databaseName</tt></a>, <a href="QSqlDatabase.html#hostName()"><tt>hostName</tt></a>, etc., are copied across. Does nothing if <tt>other</tt> is an invalid database. Returns the newly created database connection.</p>
<p>Note that the connection is not opened, to use it, it is necessary to call <a href="QSqlDatabase.html#open(java.lang.String, java.lang.String)"><tt>open</tt></a> first.</p>
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="connectionNames()"><!-- --></A><H3>
connectionNames</H3>
<PRE>
public static java.util.List&lt;java.lang.String&gt; <B>connectionNames</B>()</PRE>
<DL>
<DD><p>Returns a list containing the names of all connections.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlDatabase.html#contains(java.lang.String)"><tt>contains</tt></a>, 
<a href="QSqlDatabase.html#database(java.lang.String, boolean)"><tt>database</tt></a>, 
<a href="%2E%2E/threads.html#threads-and-the-sql-module">Threads and the SQL Module</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="contains()"><!-- --></A><H3>
contains</H3>
<PRE>
public static boolean <B>contains</B>()</PRE>
<DL>
<DD><p>Equivalent to <a href="QSqlDatabase.html#contains(java.lang.String)">contains</tt></a>(QLatin1String( defaultConnection )).
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="contains(java.lang.String)"><!-- --></A><H3>
contains</H3>
<PRE>
public static boolean <B>contains</B>(java.lang.String&nbsp;connectionName)</PRE>
<DL>
<DD><p>Returns true if the list of database connections contains <tt>connectionName</tt>; otherwise returns false.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlDatabase.html#connectionNames()"><tt>connectionNames</tt></a>, 
<a href="QSqlDatabase.html#database(java.lang.String, boolean)"><tt>database</tt></a>, 
<a href="%2E%2E/threads.html#threads-and-the-sql-module">Threads and the SQL Module</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="database(java.lang.String)"><!-- --></A><H3>
database</H3>
<PRE>
public static <A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html" title="class in com.trolltech.qt.sql">QSqlDatabase</A> <B>database</B>(java.lang.String&nbsp;connectionName)</PRE>
<DL>
<DD><p>Equivalent to <a href="QSqlDatabase.html#database(java.lang.String, boolean)">database</tt></a>(<tt>connectionName</tt>, true).
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="database()"><!-- --></A><H3>
database</H3>
<PRE>
public static <A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html" title="class in com.trolltech.qt.sql">QSqlDatabase</A> <B>database</B>()</PRE>
<DL>
<DD><p>Equivalent to <a href="QSqlDatabase.html#database(java.lang.String, boolean)">database</tt></a>(QLatin1String( defaultConnection ), true).
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="database(java.lang.String, boolean)"><!-- --></A><H3>
database</H3>
<PRE>
public static <A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html" title="class in com.trolltech.qt.sql">QSqlDatabase</A> <B>database</B>(java.lang.String&nbsp;connectionName,
                                    boolean&nbsp;open)</PRE>
<DL>
<DD><p>Returns the database connection called <tt>connectionName</tt>. The database connection must have been previously added with <a href="QSqlDatabase.html#addDatabase(com.trolltech.qt.sql.QSqlDriver, java.lang.String)"><tt>addDatabase</tt></a>. If <tt>open</tt> is true (the default) and the database connection is not already open it is opened now. If no <tt>connectionName</tt> is specified the default connection is used. If <tt>connectionName</tt> does not exist in the list of databases, an invalid connection is returned.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlDatabase.html#isOpen()"><tt>isOpen</tt></a>, 
<a href="%2E%2E/threads.html#threads-and-the-sql-module">Threads and the SQL Module</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="drivers()"><!-- --></A><H3>
drivers</H3>
<PRE>
public static java.util.List&lt;java.lang.String&gt; <B>drivers</B>()</PRE>
<DL>
<DD><p>Returns a list of all the available database drivers.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlDatabase.html#registerSqlDriver(java.lang.String, com.trolltech.qt.sql.QSqlDriverCreatorBase)"><tt>registerSqlDriver</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="isDriverAvailable(java.lang.String)"><!-- --></A><H3>
isDriverAvailable</H3>
<PRE>
public static boolean <B>isDriverAvailable</B>(java.lang.String&nbsp;name)</PRE>
<DL>
<DD><p>Returns true if a driver called <tt>name</tt> is available; otherwise returns false.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlDatabase.html#drivers()"><tt>drivers</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="registerSqlDriver(java.lang.String, com.trolltech.qt.sql.QSqlDriverCreatorBase)"><!-- --></A><H3>
registerSqlDriver</H3>
<PRE>
public static void <B>registerSqlDriver</B>(java.lang.String&nbsp;name,
                                     <A HREF="../../../../com/trolltech/qt/sql/QSqlDriverCreatorBase.html" title="class in com.trolltech.qt.sql">QSqlDriverCreatorBase</A>&nbsp;creator)</PRE>
<DL>
<DD><p>This function registers a new SQL driver called <tt>name</tt>, within the SQL framework. This is useful if you have a custom SQL driver and don't want to compile it as a plugin.</p>
<p>Example:</p>
<pre>    QSqlDatabase::registerSqlDriver(&quot;MYDRIVER&quot;,
                                    new QSqlDriverCreator&lt;MyDatabaseDriver&gt;);
    QSqlDatabase db = QSqlDatabase::addDatabase(&quot;MYDRIVER&quot;);</pre>
<p><a href="QSqlDatabase.html#QSqlDatabase()"><tt>QSqlDatabase</tt></a> takes ownership of the <tt>creator</tt> pointer, so you mustn't delete it yourself.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlDatabase.html#drivers()"><tt>drivers</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="removeDatabase(java.lang.String)"><!-- --></A><H3>
removeDatabase</H3>
<PRE>
public static void <B>removeDatabase</B>(java.lang.String&nbsp;connectionName)</PRE>
<DL>
<DD><p>Removes the database connection <tt>connectionName</tt> from the list of database connections.</p>
<p><b>Warning:</b> There should be no open queries on the database connection when this function is called, otherwise a resource leak will occur.</p>
<p>Example:</p>
<pre><span class="comment">    // WRONG</span>
    QSqlDatabase db = QSqlDatabase::database(&quot;sales&quot;);
    QSqlQuery query(&quot;SELECT NAME, DOB FROM EMPLOYEES&quot;, db);
    QSqlDatabase::removeDatabase(&quot;sales&quot;); <span class="comment">// will output a warning</span>

<span class="comment">    // &quot;db&quot; is now a dangling invalid database connection,</span>
<span class="comment">    // &quot;query&quot; contains an invalid result set</span></pre>
<p>The correct way to do it:</p>
<pre>    {
        QSqlDatabase db = QSqlDatabase::database(&quot;sales&quot;);
        QSqlQuery query(&quot;SELECT NAME, DOB FROM EMPLOYEES&quot;, db);
    }
<span class="comment">    // Both &quot;db&quot; and &quot;query&quot; are destroyed because they are out of scope</span>
    QSqlDatabase::removeDatabase(&quot;sales&quot;); <span class="comment">// correct</span></pre>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSqlDatabase.html#database(java.lang.String, boolean)"><tt>database</tt></a>, 
<a href="%2E%2E/threads.html#threads-and-the-sql-module">Threads and the SQL Module</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="fromNativePointer(com.trolltech.qt.QNativePointer)"><!-- --></A><H3>
fromNativePointer</H3>
<PRE>
public static <A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html" title="class in com.trolltech.qt.sql">QSqlDatabase</A> <B>fromNativePointer</B>(<A HREF="../../../../com/trolltech/qt/QNativePointer.html" title="class in com.trolltech.qt">QNativePointer</A>&nbsp;nativePointer)</PRE>
<DL>
<DD>This function returns the QSqlDatabase instance pointed to by nativePointer
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>nativePointer</CODE> - the QNativePointer of which object should be returned.</DL>
</DD>
</DL>
<HR>

<A NAME="nativePointerArray(com.trolltech.qt.sql.QSqlDatabase[])"><!-- --></A><H3>
nativePointerArray</H3>
<PRE>
public static <A HREF="../../../../com/trolltech/qt/QNativePointer.html" title="class in com.trolltech.qt">QNativePointer</A> <B>nativePointerArray</B>(<A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html" title="class in com.trolltech.qt.sql">QSqlDatabase</A>[]&nbsp;array)</PRE>
<DL>
<DD>This function returns a QNativePointer that is pointing to the specified QSqlDatabase array.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>array</CODE> - the array that the returned pointer will point to.
<DT><B>Returns:</B><DD>a QNativePointer that is pointing to the specified array.</DL>
</DD>
</DL>
<HR>

<A NAME="defaultConnection()"><!-- --></A><H3>
defaultConnection</H3>
<PRE>
public static java.lang.String <B>defaultConnection</B>()</PRE>
<DL>
<DD>Returns this QSqlDatabase's default connection.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../com/trolltech/qt/sql/QSql.TableType.html" title="enum in com.trolltech.qt.sql"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../com/trolltech/qt/sql/QSqlDriver.html" title="class in com.trolltech.qt.sql"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html?com/trolltech/qt/sql/QSqlDatabase.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="QSqlDatabase.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;<A HREF="#nested_classes_inherited_from_class_com.trolltech.qt.QSignalEmitter">NESTED</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>

</BODY>
</HTML>