From 5fffa30386502b5423e45c2ed5e6af756b11c7b4 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Tue, 28 May 2024 10:17:01 +0900 Subject: Rename nt* sql related files to equivalent tq* Signed-off-by: Michele Calgaro --- doc/html/sql-driver.html | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'doc/html/sql-driver.html') diff --git a/doc/html/sql-driver.html b/doc/html/sql-driver.html index 1145f5048..f678bc9ee 100644 --- a/doc/html/sql-driver.html +++ b/doc/html/sql-driver.html @@ -121,7 +121,7 @@ client libraries (>3.23.34) allow you to use transactions on those modified servers.

If you have a recent client library and connect to a transaction-enabled MySQL server, a call to the -TQSqlDriver::hasFeature( TQSqlDriver::Transactions ) function returns +TQSqlDriver::hasFeature( TQSqlDriver::Transactions ) function returns TRUE and SQL transactions can be used.

If the plugin is compiled against MySQL 4.x client libraries, transactions are enabled by default. @@ -172,15 +172,15 @@ encoding to communicate with the server. that this process may require a lot of memory.

Note that Oracle 9 doesn't support scrollable result sets with LOB columns, you have to use a forward only query to select LOB fields -(see TQSqlQuery::setForwardOnly()). +(see TQSqlQuery::setForwardOnly()).

Inserting BLOBs should be done using either a prepared query where the -BLOBs are bound to placeholders, or TQSqlCursor which uses a prepared +BLOBs are bound to placeholders, or TQSqlCursor which uses a prepared query to do this internally (see $TQTDIR/examples/sql/blob).

Know problems

-

When a query is in forward only mode a call to TQSqlQuery::last() will +

When a query is in forward only mode a call to TQSqlQuery::last() will position the query on the last record and return TRUE, but subsequent -calls to TQSqlQuery::value() will only return NULLs. +calls to TQSqlQuery::value() will only return NULLs.

How to build the plugin on Unix/Linux

All files required to build driver should ship with the standard Oracle @@ -260,14 +260,14 @@ be installed first. Note that every client that uses your application is required to have an ODBC driver manager installed, otherwise the TQODBC3 plugin will not work.

Be aware that when connecting to an ODBC datasource you must pass in -the name of the ODBC datasource to the TQSqlDatabase::setDatabaseName() +the name of the ODBC datasource to the TQSqlDatabase::setDatabaseName() function: not the actual database name.

The TQODBC3 Plugin needs an ODBC compliant driver manager version 2.0 or later to work. Some ODBC drivers claim to be version 2.0 compliant, but do not offer all the necessary functionality. The TQODBC3 plugin therefore checks whether the data source can be used after a connection has been established and refuses to work if the check -fails. If you don't like this behaviour, you can remove the #define ODBC_CHECK_DRIVER line from the file qsql_odbc.cpp. Do this at +fails. If you don't like this behaviour, you can remove the #define ODBC_CHECK_DRIVER line from the file tqsql_odbc.cpp. Do this at your own risk!

If you experience very slow access of the ODBC datasource, make sure that ODBC call tracing is turned off in the ODBC datasource manager. @@ -408,7 +408,7 @@ nmake

By default the Microsoft library is used on Windows, if you want to force the use of the Sybase Open Client, you must define -Q_USE_SYBASE in %TQTDIR%\src\sql\drivers\tds\qsql_tds.cpp. +Q_USE_SYBASE in %TQTDIR%\src\sql\drivers\tds\tqsql_tds.cpp.

TQDB2 - IBM DB2 Driver (v7.1 or higher)

@@ -422,7 +422,7 @@ files necessary for compiling the TQDB2 plugin.

The TQDB2 driver supports prepared queries, reading/writing of Unicode strings and reading/writing of BLOBs.

We suggest using a forward-only query when calling stored procedures -in DB2 (see TQSqlQuery::setForwardOnly()). +in DB2 (see TQSqlQuery::setForwardOnly()).

How to build the plugin on Unix/Linux

@@ -559,16 +559,16 @@ error message.
 

How to write your own database driver

-

TQSqlDatabase is responsible for loading and managing database driver -plugins. When a database is added (see TQSqlDatabase::addDatabase()), -the appropriate driver plugin is loaded (using TQSqlDriverPlugin). +

TQSqlDatabase is responsible for loading and managing database driver +plugins. When a database is added (see TQSqlDatabase::addDatabase()), +the appropriate driver plugin is loaded (using TQSqlDriverPlugin). TQSqlDatabase relies on the driver plugin to provide interfaces for -TQSqlDriver and TQSqlResult. +TQSqlDriver and TQSqlResult.

TQSqlDriver is an abstract base class which defines the functionality of a SQL database driver. This includes functions such as -TQSqlDriver::open() and TQSqlDriver::close(). TQSqlDriver is responsible +TQSqlDriver::open() and TQSqlDriver::close(). TQSqlDriver is responsible for connecting to a database, establish the proper environment, etc. -In addition, TQSqlDriver can create TQSqlQuery objects appropriate for +In addition, TQSqlDriver can create TQSqlQuery objects appropriate for the particular database API. TQSqlDatabase forwards many of its function calls directly to TQSqlDriver which provides the concrete implementation. @@ -577,9 +577,9 @@ of a SQL database query. This includes statements such as SELECT, UPDATE, and ALTER TABLE. TQSqlResult contains functions such as TQSqlResult::next() and TQSqlResult::value(). TQSqlResult is responsible for sending queries to the database, returning result data, etc. -TQSqlQuery forwards many of its function calls directly to TQSqlResult +TQSqlQuery forwards many of its function calls directly to TQSqlResult which provides the concrete implementation. -

TQSqlDriver and TQSqlResult are closely connected. When implementing a +

TQSqlDriver and TQSqlResult are closely connected. When implementing a TQt SQL driver, both of these classes must to be subclassed and the abstract virtual methods in each class must be implemented.

To implement a TQt SQL driver as a plugin (so that it is recognized and @@ -591,10 +591,10 @@ with TQt in TQTDIR/plugins/src/sqldrivers and TQTDIR/src/sql/drivers.

The following code can be used as a skeleton for a SQL driver:

-class TQNullResult : public TQSqlResult
+class TQNullResult : public TQSqlResult
 {
 public:
-    TQNullResult( const TQSqlDriver* d ): TQSqlResult( d ) {}
+    TQNullResult( const TQSqlDriver* d ): TQSqlResult( d ) {}
     ~TQNullResult() {}
 protected:
     TQVariant    data( int ) { return TQVariant(); }
@@ -603,15 +603,15 @@ protected:
     bool        fetchFirst() { return FALSE; }
     bool        fetchLast() { return FALSE; }
     bool        isNull( int ) { return FALSE; }
-    TQSqlRecord  record() { return TQSqlRecord(); }
+    TQSqlRecord  record() { return TQSqlRecord(); }
     int         size()  { return 0; }
     int         numRowsAffected() { return 0; }
 };
 
-class TQNullDriver : public TQSqlDriver
+class TQNullDriver : public TQSqlDriver
 {
 public:
-    TQNullDriver(): TQSqlDriver() {}
+    TQNullDriver(): TQSqlDriver() {}
     ~TQNullDriver() {}
     bool    hasFeature( DriverFeature ) const { return FALSE; }
     bool    open( const TQString&,
@@ -620,7 +620,7 @@ public:
                   const TQString&,
                   int ) { return FALSE; }
     void    close() {}
-    TQSqlQuery createQuery() const { return TQSqlQuery( new TQNullResult( this ) ); }
+    TQSqlQuery createQuery() const { return TQSqlQuery( new TQNullResult( this ) ); }
 };
 
-- cgit v1.2.3