<!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> QSqlDriver </TITLE> <META NAME="keywords" CONTENT="com.trolltech.qt.sql.QSqlDriver class"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { parent.document.title="QSqlDriver"; } </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> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html" title="class in com.trolltech.qt.sql"><B>PREV CLASS</B></A> <A HREF="../../../../com/trolltech/qt/sql/QSqlDriver.DriverFeature.html" title="enum 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/QSqlDriver.html" target="_top"><B>FRAMES</B></A> <A HREF="QSqlDriver.html" target="_top"><B>NO FRAMES</B></A> <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: <A HREF="#nested_class_summary">NESTED</A> | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <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 QSqlDriver</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 "><A HREF="../../../../com/trolltech/qt/core/QObject.html" title="class in com.trolltech.qt.core">com.trolltech.qt.core.QObject</A> <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.trolltech.qt.sql.QSqlDriver</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 abstract class <B>QSqlDriver</B><DT>extends <A HREF="../../../../com/trolltech/qt/core/QObject.html" title="class in com.trolltech.qt.core">QObject</A></DL> </PRE> <P> <p>The <a href="QSqlDriver.html#QSqlDriver(com.trolltech.qt.core.QObject)"><tt>QSqlDriver</tt></a> class is an abstract base class for accessing specific SQL databases.</p> <p>This class should not be used directly. Use <a href="QSqlDatabase.html"><tt>QSqlDatabase</tt></a> instead.</p> <p>If you want to create your own SQL drivers, you can subclass this class and reimplement its pure virtual functions and those virtual functions that you need. See <a href="%2E%2E/sql-driver.html#how-to-write-your-own-database-driver">How to Write Your Own Database Driver</tt></a> for more information.</p> <P> <P> <DL> <DT><B>See Also:</B><DD><a href="QSqlDatabase.html"><tt>QSqlDatabase</tt></a>, <a href="QSqlResult.html"><tt>QSqlResult</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> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static class</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDriver.DriverFeature.html" title="enum in com.trolltech.qt.sql">QSqlDriver.DriverFeature</A></B></CODE> <BR> This enum contains a list of features a driver might support.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static class</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDriver.IdentifierType.html" title="enum in com.trolltech.qt.sql">QSqlDriver.IdentifierType</A></B></CODE> <BR> This enum contains a list of SQL identifier types.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static class</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDriver.StatementType.html" title="enum in com.trolltech.qt.sql">QSqlDriver.StatementType</A></B></CODE> <BR> This enum contains a list of SQL statement (or clause) types the driver can create.</TD> </TR> </TABLE> <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><<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal1.html" title="type parameter in QSignalEmitter.Signal1">A</A>>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal2.html" title="class in com.trolltech.qt">QSignalEmitter.Signal2</A><<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>>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal3.html" title="class in com.trolltech.qt">QSignalEmitter.Signal3</A><<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>>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal4.html" title="class in com.trolltech.qt">QSignalEmitter.Signal4</A><<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>>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal5.html" title="class in com.trolltech.qt">QSignalEmitter.Signal5</A><<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>>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="class in com.trolltech.qt">QSignalEmitter.Signal6</A><<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>>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="class in com.trolltech.qt">QSignalEmitter.Signal7</A><<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>>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="class in com.trolltech.qt">QSignalEmitter.Signal8</A><<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>>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="class in com.trolltech.qt">QSignalEmitter.Signal9</A><<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>></CODE></TD> </TR> </TABLE> <!-- ======== 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><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDriver.html#QSqlDriver()">QSqlDriver</A></B>()</CODE> <BR> Equivalent to <a href="QSqlDriver.html#QSqlDriver(com.trolltech.qt.core.QObject)"><tt>QSqlDriver</tt></a>(0).</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDriver.html#QSqlDriver(com.trolltech.qt.core.QObject)">QSqlDriver</A></B>(<A HREF="../../../../com/trolltech/qt/core/QObject.html" title="class in com.trolltech.qt.core">QObject</A> parent)</CODE> <BR> Constructs a new driver with the given <tt>parent</tt>.</TD> </TR> </TABLE> <!-- ========== 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> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDriver.html#beginTransaction()">beginTransaction</A></B>()</CODE> <BR> This function is called to begin a transaction.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>abstract void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDriver.html#close()">close</A></B>()</CODE> <BR> Derived classes must reimplement this pure virtual function in order to close the database connection.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDriver.html#commitTransaction()">commitTransaction</A></B>()</CODE> <BR> This function is called to commit a transaction.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>abstract <A HREF="../../../../com/trolltech/qt/sql/QSqlResult.html" title="class in com.trolltech.qt.sql">QSqlResult</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDriver.html#createResult()">createResult</A></B>()</CODE> <BR> Creates an empty SQL result on the database.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.String</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDriver.html#escapeIdentifier(java.lang.String, com.trolltech.qt.sql.QSqlDriver.IdentifierType)">escapeIdentifier</A></B>(java.lang.String identifier, <A HREF="../../../../com/trolltech/qt/sql/QSqlDriver.IdentifierType.html" title="enum in com.trolltech.qt.sql">QSqlDriver.IdentifierType</A> type)</CODE> <BR> Returns the <tt>identifier</tt> escaped according to the database rules.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.String</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDriver.html#formatValue(com.trolltech.qt.sql.QSqlField)">formatValue</A></B>(<A HREF="../../../../com/trolltech/qt/sql/QSqlField.html" title="class in com.trolltech.qt.sql">QSqlField</A> field)</CODE> <BR> Equivalent to <a href="QSqlDriver.html#formatValue(com.trolltech.qt.sql.QSqlField, boolean)"><tt>formatValue</tt></a>(<tt>field</tt>, false).</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.String</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDriver.html#formatValue(com.trolltech.qt.sql.QSqlField, boolean)">formatValue</A></B>(<A HREF="../../../../com/trolltech/qt/sql/QSqlField.html" title="class in com.trolltech.qt.sql">QSqlField</A> field, boolean trimStrings)</CODE> <BR> Returns a string representation of the <tt>field</tt> value for the database.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static <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/QSqlDriver.html#fromNativePointer(com.trolltech.qt.QNativePointer)">fromNativePointer</A></B>(<A HREF="../../../../com/trolltech/qt/QNativePointer.html" title="class in com.trolltech.qt">QNativePointer</A> nativePointer)</CODE> <BR> This function returns the QSqlDriver instance pointed to by nativePointer</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.Object</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDriver.html#handle()">handle</A></B>()</CODE> <BR> Returns the low-level database handle wrapped in a <a href="%2E%2E/porting4.html#qvariant"><tt>QVariant</tt></a> or an invalid variant if there is no handle.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>abstract boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDriver.html#hasFeature(com.trolltech.qt.sql.QSqlDriver.DriverFeature)">hasFeature</A></B>(<A HREF="../../../../com/trolltech/qt/sql/QSqlDriver.DriverFeature.html" title="enum in com.trolltech.qt.sql">QSqlDriver.DriverFeature</A> f)</CODE> <BR> Returns true if the driver supports feature <tt>f</tt>; otherwise returns false.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDriver.html#isOpen()">isOpen</A></B>()</CODE> <BR> Returns true if the database connection is open; otherwise returns false.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDriver.html#isOpenError()">isOpenError</A></B>()</CODE> <BR> Returns true if the 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> <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/QSqlDriver.html#lastError()">lastError</A></B>()</CODE> <BR> Returns a <a href="QSqlError.html"><tt>QSqlError</tt></a> object which contains 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> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDriver.html#open(java.lang.String)">open</A></B>(java.lang.String db)</CODE> <BR> Equivalent to <a href="QSqlDriver.html#open(java.lang.String, java.lang.String, java.lang.String, java.lang.String, int, java.lang.String)">open</tt></a>(<tt>db</tt>, QString(), QString(), QString(), -1, QString()).</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDriver.html#open(java.lang.String, java.lang.String)">open</A></B>(java.lang.String db, java.lang.String user)</CODE> <BR> Equivalent to <a href="QSqlDriver.html#open(java.lang.String, java.lang.String, java.lang.String, java.lang.String, int, java.lang.String)">open</tt></a>(<tt>db</tt>, <tt>user</tt>, QString(), QString(), -1, QString()).</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDriver.html#open(java.lang.String, java.lang.String, java.lang.String)">open</A></B>(java.lang.String db, java.lang.String user, java.lang.String password)</CODE> <BR> Equivalent to <a href="QSqlDriver.html#open(java.lang.String, java.lang.String, java.lang.String, java.lang.String, int, java.lang.String)">open</tt></a>(<tt>db</tt>, <tt>user</tt>, <tt>password</tt>, QString(), -1, QString()).</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDriver.html#open(java.lang.String, java.lang.String, java.lang.String, java.lang.String)">open</A></B>(java.lang.String db, java.lang.String user, java.lang.String password, java.lang.String host)</CODE> <BR> Equivalent to <a href="QSqlDriver.html#open(java.lang.String, java.lang.String, java.lang.String, java.lang.String, int, java.lang.String)">open</tt></a>(<tt>db</tt>, <tt>user</tt>, <tt>password</tt>, <tt>host</tt>, -1, QString()).</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDriver.html#open(java.lang.String, java.lang.String, java.lang.String, java.lang.String, int)">open</A></B>(java.lang.String db, java.lang.String user, java.lang.String password, java.lang.String host, int port)</CODE> <BR> Equivalent to <a href="QSqlDriver.html#open(java.lang.String, java.lang.String, java.lang.String, java.lang.String, int, java.lang.String)">open</tt></a>(<tt>db</tt>, <tt>user</tt>, <tt>password</tt>, <tt>host</tt>, <tt>port</tt>, QString()).</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>abstract boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDriver.html#open(java.lang.String, java.lang.String, java.lang.String, java.lang.String, int, java.lang.String)">open</A></B>(java.lang.String db, java.lang.String user, java.lang.String password, java.lang.String host, int port, java.lang.String connOpts)</CODE> <BR> Derived classes must reimplement this pure virtual function to open a database connection on database <tt>db</tt>, using user name <tt>user</tt>, password <tt>password</tt>, host <tt>host</tt>, port <tt>port</tt> and connection options <tt>connOpts</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <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/QSqlDriver.html#primaryIndex(java.lang.String)">primaryIndex</A></B>(java.lang.String tableName)</CODE> <BR> 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> <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/QSqlDriver.html#record(java.lang.String)">record</A></B>(java.lang.String tableName)</CODE> <BR> Returns a <a href="QSqlRecord.html"><tt>QSqlRecord</tt></a> populated with the names of the fields in table <tt>tableName</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDriver.html#rollbackTransaction()">rollbackTransaction</A></B>()</CODE> <BR> This function is called to rollback a transaction.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDriver.html#setLastError(com.trolltech.qt.sql.QSqlError)">setLastError</A></B>(<A HREF="../../../../com/trolltech/qt/sql/QSqlError.html" title="class in com.trolltech.qt.sql">QSqlError</A> e)</CODE> <BR> This function is used to set the value of the last error, <tt>e</tt>, that occurred on the database.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDriver.html#setOpen(boolean)">setOpen</A></B>(boolean o)</CODE> <BR> This function sets the open state of the database to <tt>o</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDriver.html#setOpenError(boolean)">setOpenError</A></B>(boolean e)</CODE> <BR> This function sets the open error state of the database to <tt>e</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.String</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDriver.html#sqlStatement(com.trolltech.qt.sql.QSqlDriver.StatementType, java.lang.String, com.trolltech.qt.sql.QSqlRecord, boolean)">sqlStatement</A></B>(<A HREF="../../../../com/trolltech/qt/sql/QSqlDriver.StatementType.html" title="enum in com.trolltech.qt.sql">QSqlDriver.StatementType</A> type, java.lang.String tableName, <A HREF="../../../../com/trolltech/qt/sql/QSqlRecord.html" title="class in com.trolltech.qt.sql">QSqlRecord</A> rec, boolean preparedStatement)</CODE> <BR> Returns a SQL statement of type <tt>type</tt> for the table <tt>tableName</tt> with the values from <tt>rec</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.util.List<java.lang.String></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/sql/QSqlDriver.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> tableType)</CODE> <BR> Returns a list of the names of the tables in the database.</TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_com.trolltech.qt.core.QObject"><!-- --></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.core.<A HREF="../../../../com/trolltech/qt/core/QObject.html" title="class in com.trolltech.qt.core">QObject</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../../com/trolltech/qt/core/QObject.html#blockSignals(boolean)">blockSignals</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#childEvent(com.trolltech.qt.core.QChildEvent)">childEvent</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#children()">children</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#connectSlotsByName()">connectSlotsByName</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#customEvent(com.trolltech.qt.core.QEvent)">customEvent</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#disposeLater()">disposeLater</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#dumpObjectInfo()">dumpObjectInfo</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#dumpObjectTree()">dumpObjectTree</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#dynamicPropertyNames()">dynamicPropertyNames</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#event(com.trolltech.qt.core.QEvent)">event</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#eventFilter(com.trolltech.qt.core.QObject, com.trolltech.qt.core.QEvent)">eventFilter</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#findChild()">findChild</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#findChild(java.lang.Class)">findChild</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#findChild(java.lang.Class, java.lang.String)">findChild</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#findChildren()">findChildren</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#findChildren(java.lang.Class)">findChildren</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#findChildren(java.lang.Class, com.trolltech.qt.core.QRegExp)">findChildren</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#findChildren(java.lang.Class, java.lang.String)">findChildren</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#installEventFilter(com.trolltech.qt.core.QObject)">installEventFilter</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#isWidgetType()">isWidgetType</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#killTimer(int)">killTimer</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#moveToThread(java.lang.Thread)">moveToThread</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#objectName()">objectName</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#parent()">parent</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#property(java.lang.String)">property</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#removeEventFilter(com.trolltech.qt.core.QObject)">removeEventFilter</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#setObjectName(java.lang.String)">setObjectName</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#setParent(com.trolltech.qt.core.QObject)">setParent</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#setProperty(java.lang.String, java.lang.Object)">setProperty</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#signalsBlocked()">signalsBlocked</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#startTimer(int)">startTimer</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#thread()">thread</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#timerEvent(com.trolltech.qt.core.QTimerEvent)">timerEvent</A></CODE></TD> </TR> </TABLE> <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> <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#disconnect()">disconnect</A>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.html#disconnect(java.lang.Object)">disconnect</A>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.html#signalSender()">signalSender</A></CODE></TD> </TR> </TABLE> <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> <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> <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="QSqlDriver()"><!-- --></A><H3> QSqlDriver</H3> <PRE> public <B>QSqlDriver</B>()</PRE> <DL> <DD><p>Equivalent to <a href="QSqlDriver.html#QSqlDriver(com.trolltech.qt.core.QObject)"><tt>QSqlDriver</tt></a>(0). <P> </DL> <HR> <A NAME="QSqlDriver(com.trolltech.qt.core.QObject)"><!-- --></A><H3> QSqlDriver</H3> <PRE> public <B>QSqlDriver</B>(<A HREF="../../../../com/trolltech/qt/core/QObject.html" title="class in com.trolltech.qt.core">QObject</A> parent)</PRE> <DL> <DD><p>Constructs a new driver with the given <tt>parent</tt>.</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="isOpenError()"><!-- --></A><H3> isOpenError</H3> <PRE> public final boolean <B>isOpenError</B>()</PRE> <DL> <DD><p>Returns true if the there was an error opening the database connection; otherwise returns false.</p> <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 a <a href="QSqlError.html"><tt>QSqlError</tt></a> object which contains information about the last error that occurred on the database.</p> <P> <DD><DL> <DT><B>See Also:</B><DD><a href="QSqlDriver.html#setLastError(com.trolltech.qt.sql.QSqlError)"><tt>setLastError</tt></a></DL> </DD> </DL> <HR> <A NAME="beginTransaction()"><!-- --></A><H3> beginTransaction</H3> <PRE> public boolean <B>beginTransaction</B>()</PRE> <DL> <DD><p>This function is called to begin a transaction. If successful, return true, otherwise return false. The default implementation does nothing and returns false.</p> <P> <DD><DL> <DT><B>See Also:</B><DD><a href="QSqlDriver.html#commitTransaction()"><tt>commitTransaction</tt></a>, <a href="QSqlDriver.html#rollbackTransaction()"><tt>rollbackTransaction</tt></a></DL> </DD> </DL> <HR> <A NAME="close()"><!-- --></A><H3> close</H3> <PRE> public abstract void <B>close</B>()</PRE> <DL> <DD><p>Derived classes must reimplement this pure virtual function in order to close the database connection. Return true on success, false on failure.</p> <P> <DD><DL> <DT><B>See Also:</B><DD><a href="QSqlDriver.html#open(java.lang.String, java.lang.String, java.lang.String, java.lang.String, int, java.lang.String)"><tt>open</tt></a>, <a href="QSqlDriver.html#setOpen(boolean)"><tt>setOpen</tt></a></DL> </DD> </DL> <HR> <A NAME="commitTransaction()"><!-- --></A><H3> commitTransaction</H3> <PRE> public boolean <B>commitTransaction</B>()</PRE> <DL> <DD><p>This function is called to commit a transaction. If successful, return true, otherwise return false. The default implementation does nothing and returns false.</p> <P> <DD><DL> <DT><B>See Also:</B><DD><a href="QSqlDriver.html#beginTransaction()"><tt>beginTransaction</tt></a>, <a href="QSqlDriver.html#rollbackTransaction()"><tt>rollbackTransaction</tt></a></DL> </DD> </DL> <HR> <A NAME="createResult()"><!-- --></A><H3> createResult</H3> <PRE> public abstract <A HREF="../../../../com/trolltech/qt/sql/QSqlResult.html" title="class in com.trolltech.qt.sql">QSqlResult</A> <B>createResult</B>()</PRE> <DL> <DD><p>Creates an empty SQL result on the database. Derived classes must reimplement this function and return a <a href="QSqlResult.html"><tt>QSqlResult</tt></a> object appropriate for their database to the caller.</p> <P> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="escapeIdentifier(java.lang.String, com.trolltech.qt.sql.QSqlDriver.IdentifierType)"><!-- --></A><H3> escapeIdentifier</H3> <PRE> public java.lang.String <B>escapeIdentifier</B>(java.lang.String identifier, <A HREF="../../../../com/trolltech/qt/sql/QSqlDriver.IdentifierType.html" title="enum in com.trolltech.qt.sql">QSqlDriver.IdentifierType</A> type)</PRE> <DL> <DD><p>Returns the <tt>identifier</tt> escaped according to the database rules. <tt>identifier</tt> can either be a table name or field name, dependent on <tt>type</tt>.</p> <p>The default implementation does nothing.</p> <P> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="formatValue(com.trolltech.qt.sql.QSqlField)"><!-- --></A><H3> formatValue</H3> <PRE> public final java.lang.String <B>formatValue</B>(<A HREF="../../../../com/trolltech/qt/sql/QSqlField.html" title="class in com.trolltech.qt.sql">QSqlField</A> field)</PRE> <DL> <DD><p>Equivalent to <a href="QSqlDriver.html#formatValue(com.trolltech.qt.sql.QSqlField, boolean)"><tt>formatValue</tt></a>(<tt>field</tt>, false). <P> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="formatValue(com.trolltech.qt.sql.QSqlField, boolean)"><!-- --></A><H3> formatValue</H3> <PRE> public java.lang.String <B>formatValue</B>(<A HREF="../../../../com/trolltech/qt/sql/QSqlField.html" title="class in com.trolltech.qt.sql">QSqlField</A> field, boolean trimStrings)</PRE> <DL> <DD><p>Returns a string representation of the <tt>field</tt> value for the database. This is used, for example, when constructing INSERT and UPDATE statements.</p> <p>The default implementation returns the value formatted as a string according to the following rules:</p> <ul> <li>If <tt>field</tt> is character data, the value is returned enclosed in single quotation marks, which is appropriate for many SQL databases. Any embedded single-quote characters are escaped (replaced with two single-quote characters). If <tt>trimStrings</tt> is true (the default is false), all trailing whitespace is trimmed from the field.</li> <li>If <tt>field</tt> is date/time data, the value is formatted in ISO format and enclosed in single quotation marks. If the date/time data is invalid, "NULL" is returned.</li> <li>If <tt>field</tt> is <a href="%2E%2E/core/QByteArray.html">bytearray</tt></a> data, and the driver can edit binary fields, the value is formatted as a hexadecimal string.</li> <li>For any other field type, toString() is called on its value and the result of this is returned.</li> </ul> <P> <DD><DL> <DT><B>See Also:</B><DD><tt>QVariant::toString</tt></DL> </DD> </DL> <HR> <A NAME="handle()"><!-- --></A><H3> handle</H3> <PRE> public java.lang.Object <B>handle</B>()</PRE> <DL> <DD><p>Returns the low-level database handle wrapped in a <a href="%2E%2E/porting4.html#qvariant"><tt>QVariant</tt></a> or an invalid variant if there is no handle.</p> <p><b>Warning:</b> Use this with uttermost care and only if you know what you're doing.</p> <p><b>Warning:</b> The handle returned here can become a stale pointer if the connection is modified (for example, if you close the connection).</p> <p><b>Warning:</b> The handle can be NULL if the connection is not open yet.</p> <p>The handle returned here is database-dependent, you should query the type name of the variant before accessing it.</p> <p>This example retrieves the handle for a connection to sqlite:</p> <pre> QSqlDatabase db = ...; QVariant v = db.driver()->handle(); if (v.isValid() && v.typeName() == "sqlite3*") { <span class="comment">// v.data() returns a pointer to the handle</span> sqlite3 *handle = *static_cast<sqlite3 **>(v.data()); if (handle != 0) { <span class="comment">// check that it is not NULL</span> ... } }</pre> <p>This snippet returns the handle for PostgreSQL or MySQL:</p> <pre> if (v.typeName() == "PGconn*") { PGconn *handle = *static_cast<PGconn **>(v.data()); if (handle != 0) ... } if (v.typeName() == "MYSQL*") { MYSQL *handle = *static_cast<MYSQL **>(v.data()); if (handle != 0) ... }</pre> <P> <DD><DL> <DT><B>See Also:</B><DD><tt>QSqlResult::handle</tt></DL> </DD> </DL> <HR> <A NAME="hasFeature(com.trolltech.qt.sql.QSqlDriver.DriverFeature)"><!-- --></A><H3> hasFeature</H3> <PRE> public abstract boolean <B>hasFeature</B>(<A HREF="../../../../com/trolltech/qt/sql/QSqlDriver.DriverFeature.html" title="enum in com.trolltech.qt.sql">QSqlDriver.DriverFeature</A> f)</PRE> <DL> <DD><p>Returns true if the driver supports feature <tt>f</tt>; otherwise returns false.</p> <p>Note that some databases need to be <a href="QSqlDriver.html#open(java.lang.String, java.lang.String, java.lang.String, java.lang.String, int, java.lang.String)"><tt>open</tt></a> before this can be determined.</p> <P> <DD><DL> <DT><B>See Also:</B><DD><a href="QSqlDriver.html#DriverFeature-enum"><tt>DriverFeature</tt></a></DL> </DD> </DL> <HR> <A NAME="isOpen()"><!-- --></A><H3> isOpen</H3> <PRE> public boolean <B>isOpen</B>()</PRE> <DL> <DD><p>Returns true if the database connection is open; otherwise returns false.</p> <P> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="open(java.lang.String, java.lang.String, java.lang.String, java.lang.String, int)"><!-- --></A><H3> open</H3> <PRE> public final boolean <B>open</B>(java.lang.String db, java.lang.String user, java.lang.String password, java.lang.String host, int port)</PRE> <DL> <DD><p>Equivalent to <a href="QSqlDriver.html#open(java.lang.String, java.lang.String, java.lang.String, java.lang.String, int, java.lang.String)">open</tt></a>(<tt>db</tt>, <tt>user</tt>, <tt>password</tt>, <tt>host</tt>, <tt>port</tt>, QString()). <P> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="open(java.lang.String, java.lang.String, java.lang.String, java.lang.String)"><!-- --></A><H3> open</H3> <PRE> public final boolean <B>open</B>(java.lang.String db, java.lang.String user, java.lang.String password, java.lang.String host)</PRE> <DL> <DD><p>Equivalent to <a href="QSqlDriver.html#open(java.lang.String, java.lang.String, java.lang.String, java.lang.String, int, java.lang.String)">open</tt></a>(<tt>db</tt>, <tt>user</tt>, <tt>password</tt>, <tt>host</tt>, -1, QString()). <P> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="open(java.lang.String, java.lang.String, java.lang.String)"><!-- --></A><H3> open</H3> <PRE> public final boolean <B>open</B>(java.lang.String db, java.lang.String user, java.lang.String password)</PRE> <DL> <DD><p>Equivalent to <a href="QSqlDriver.html#open(java.lang.String, java.lang.String, java.lang.String, java.lang.String, int, java.lang.String)">open</tt></a>(<tt>db</tt>, <tt>user</tt>, <tt>password</tt>, QString(), -1, QString()). <P> <DD><DL> </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 db, java.lang.String user)</PRE> <DL> <DD><p>Equivalent to <a href="QSqlDriver.html#open(java.lang.String, java.lang.String, java.lang.String, java.lang.String, int, java.lang.String)">open</tt></a>(<tt>db</tt>, <tt>user</tt>, QString(), QString(), -1, QString()). <P> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="open(java.lang.String)"><!-- --></A><H3> open</H3> <PRE> public final boolean <B>open</B>(java.lang.String db)</PRE> <DL> <DD><p>Equivalent to <a href="QSqlDriver.html#open(java.lang.String, java.lang.String, java.lang.String, java.lang.String, int, java.lang.String)">open</tt></a>(<tt>db</tt>, QString(), QString(), QString(), -1, QString()). <P> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="open(java.lang.String, java.lang.String, java.lang.String, java.lang.String, int, java.lang.String)"><!-- --></A><H3> open</H3> <PRE> public abstract boolean <B>open</B>(java.lang.String db, java.lang.String user, java.lang.String password, java.lang.String host, int port, java.lang.String connOpts)</PRE> <DL> <DD><p>Derived classes must reimplement this pure virtual function to open a database connection on database <tt>db</tt>, using user name <tt>user</tt>, password <tt>password</tt>, host <tt>host</tt>, port <tt>port</tt> and connection options <tt>connOpts</tt>.</p> <p>The function must return true on success and false on failure.</p> <P> <DD><DL> <DT><B>See Also:</B><DD><a href="QSqlDriver.html#setOpen(boolean)"><tt>setOpen</tt></a></DL> </DD> </DL> <HR> <A NAME="primaryIndex(java.lang.String)"><!-- --></A><H3> primaryIndex</H3> <PRE> public <A HREF="../../../../com/trolltech/qt/sql/QSqlIndex.html" title="class in com.trolltech.qt.sql">QSqlIndex</A> <B>primaryIndex</B>(java.lang.String tableName)</PRE> <DL> <DD><p>Returns the primary index for table <tt>tableName</tt>. Returns an empty <a href="QSqlIndex.html"><tt>QSqlIndex</tt></a> if the table doesn't have a primary index. The default implementation returns an empty index.</p> <P> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="record(java.lang.String)"><!-- --></A><H3> record</H3> <PRE> public <A HREF="../../../../com/trolltech/qt/sql/QSqlRecord.html" title="class in com.trolltech.qt.sql">QSqlRecord</A> <B>record</B>(java.lang.String tableName)</PRE> <DL> <DD><p>Returns a <a href="QSqlRecord.html"><tt>QSqlRecord</tt></a> populated with the names of the fields in table <tt>tableName</tt>. If no such table exists, an empty record is returned. The default implementation returns an empty record.</p> <P> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="rollbackTransaction()"><!-- --></A><H3> rollbackTransaction</H3> <PRE> public boolean <B>rollbackTransaction</B>()</PRE> <DL> <DD><p>This function is called to rollback a transaction. If successful, return true, otherwise return false. The default implementation does nothing and returns false.</p> <P> <DD><DL> <DT><B>See Also:</B><DD><a href="QSqlDriver.html#beginTransaction()"><tt>beginTransaction</tt></a>, <a href="QSqlDriver.html#commitTransaction()"><tt>commitTransaction</tt></a></DL> </DD> </DL> <HR> <A NAME="setLastError(com.trolltech.qt.sql.QSqlError)"><!-- --></A><H3> setLastError</H3> <PRE> protected void <B>setLastError</B>(<A HREF="../../../../com/trolltech/qt/sql/QSqlError.html" title="class in com.trolltech.qt.sql">QSqlError</A> e)</PRE> <DL> <DD><p>This function is used to set the value of the last error, <tt>e</tt>, that occurred on the database.</p> <P> <DD><DL> <DT><B>See Also:</B><DD><a href="QSqlDriver.html#lastError()"><tt>lastError</tt></a></DL> </DD> </DL> <HR> <A NAME="setOpen(boolean)"><!-- --></A><H3> setOpen</H3> <PRE> protected void <B>setOpen</B>(boolean o)</PRE> <DL> <DD><p>This function sets the open state of the database to <tt>o</tt>. Derived classes can use this function to report the status of <a href="QSqlDriver.html#open(java.lang.String, java.lang.String, java.lang.String, java.lang.String, int, java.lang.String)"><tt>open</tt></a>.</p> <P> <DD><DL> <DT><B>See Also:</B><DD><a href="QSqlDriver.html#open(java.lang.String, java.lang.String, java.lang.String, java.lang.String, int, java.lang.String)"><tt>open</tt></a>, <a href="QSqlDriver.html#setOpenError(boolean)"><tt>setOpenError</tt></a></DL> </DD> </DL> <HR> <A NAME="setOpenError(boolean)"><!-- --></A><H3> setOpenError</H3> <PRE> protected void <B>setOpenError</B>(boolean e)</PRE> <DL> <DD><p>This function sets the open error state of the database to <tt>e</tt>. Derived classes can use this function to report the status of <a href="QSqlDriver.html#open(java.lang.String, java.lang.String, java.lang.String, java.lang.String, int, java.lang.String)"><tt>open</tt></a>. Note that if <tt>e</tt> is true the open state of the database is set to closed (i.e., <a href="QSqlDriver.html#isOpen()"><tt>isOpen</tt></a> returns false).</p> <P> <DD><DL> <DT><B>See Also:</B><DD><a href="QSqlDriver.html#isOpenError()"><tt>isOpenError</tt></a>, <a href="QSqlDriver.html#open(java.lang.String, java.lang.String, java.lang.String, java.lang.String, int, java.lang.String)"><tt>open</tt></a>, <a href="QSqlDriver.html#setOpen(boolean)"><tt>setOpen</tt></a></DL> </DD> </DL> <HR> <A NAME="sqlStatement(com.trolltech.qt.sql.QSqlDriver.StatementType, java.lang.String, com.trolltech.qt.sql.QSqlRecord, boolean)"><!-- --></A><H3> sqlStatement</H3> <PRE> public java.lang.String <B>sqlStatement</B>(<A HREF="../../../../com/trolltech/qt/sql/QSqlDriver.StatementType.html" title="enum in com.trolltech.qt.sql">QSqlDriver.StatementType</A> type, java.lang.String tableName, <A HREF="../../../../com/trolltech/qt/sql/QSqlRecord.html" title="class in com.trolltech.qt.sql">QSqlRecord</A> rec, boolean preparedStatement)</PRE> <DL> <DD><p>Returns a SQL statement of type <tt>type</tt> for the table <tt>tableName</tt> with the values from <tt>rec</tt>. If <tt>preparedStatement</tt> is true, the string will contain placeholders instead of values.</p> <p>This method can be used to manipulate tables without having to worry about database-dependent SQL dialects. For non-prepared statements, the values will be properly escaped.</p> <P> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="tables(com.trolltech.qt.sql.QSql.TableType)"><!-- --></A><H3> tables</H3> <PRE> public java.util.List<java.lang.String> <B>tables</B>(<A HREF="../../../../com/trolltech/qt/sql/QSql.TableType.html" title="enum in com.trolltech.qt.sql">QSql.TableType</A> tableType)</PRE> <DL> <DD><p>Returns a list of the names of the tables in the database. The default implementation returns an empty list.</p> <p>The <tt>tableType</tt> argument describes what types of tables should be returned. Due to binary compatibility, the string contains the value of the enum QSql::TableTypes as text. An empty string should be treated as QSql::Tables for backward compatibility.</p> <P> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="fromNativePointer(com.trolltech.qt.QNativePointer)"><!-- --></A><H3> fromNativePointer</H3> <PRE> public static <A HREF="../../../../com/trolltech/qt/sql/QSqlDriver.html" title="class in com.trolltech.qt.sql">QSqlDriver</A> <B>fromNativePointer</B>(<A HREF="../../../../com/trolltech/qt/QNativePointer.html" title="class in com.trolltech.qt">QNativePointer</A> nativePointer)</PRE> <DL> <DD>This function returns the QSqlDriver 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> <!-- ========= 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> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../com/trolltech/qt/sql/QSqlDatabase.html" title="class in com.trolltech.qt.sql"><B>PREV CLASS</B></A> <A HREF="../../../../com/trolltech/qt/sql/QSqlDriver.DriverFeature.html" title="enum 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/QSqlDriver.html" target="_top"><B>FRAMES</B></A> <A HREF="QSqlDriver.html" target="_top"><B>NO FRAMES</B></A> <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: <A HREF="#nested_class_summary">NESTED</A> | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> </BODY> </HTML>