Added:
MYSQLCC/include/MDiagnostic.h
Removed:
MYSQLCC/MYSQLCCLib/MDiagnostic.h
Modified:
MYSQLCC/MYSQLCC.vpj
MYSQLCC/MYSQLCCLib/MYSQLCCLib.vpj
Log:
Modified: MYSQLCC/MYSQLCC.vpj
===================================================================
--- MYSQLCC/MYSQLCC.vpj 2006-04-26 19:24:01 UTC (rev 126)
+++ MYSQLCC/MYSQLCC.vpj 2006-04-26 19:29:51 UTC (rev 127)
@@ -58,6 +58,7 @@
<F N="include/M.h"/>
<F N="include/MConnection.h"/>
<F N="include/MDescriptor.h"/>
+ <F N="include/MDiagnostic.h"/>
<F N="include/MEnvironment.h"/>
<F N="include/MStatement.h"/>
</Folder>
Deleted: MYSQLCC/MYSQLCCLib/MDiagnostic.h
===================================================================
--- MYSQLCC/MYSQLCCLib/MDiagnostic.h 2006-04-26 19:24:01 UTC (rev 126)
+++ MYSQLCC/MYSQLCCLib/MDiagnostic.h 2006-04-26 19:29:51 UTC (rev 127)
@@ -1,116 +0,0 @@
-/*! \file MYODBCDia.h
- \author Peter Harvey <pharvey@stripped>
- \brief This code is used to support diagnostic information
- associated with various handles.
-
- This code is for internal use and as such is for MyODBC
- developers only.
-
- 0 - n diagnostic records can be associated with the following
- ODBC handles;
-
- - Environment
- - Connection
- - Statement
- - Descriptor
-
- Diagnostic information can be retreived by calling;
-
- - SQLGetDiagRec
- - SQLGetDiagField
-
- Diagnostic information, if any, should be retreived immediatly after
- calling an ODBC function because it will be lost when more ODBC
- functions are called. The exceptions to this are SQLGetDiagRec and
- SQLGetDiagField - these functions never clear diagnostic information.
-*/
-
-#ifndef MYODBC_DIA_H
-#define MYODBC_DIA_H
-
-#include <MYODBCC.h>
-#include <MYODBCDbg.h>
-
-#include <QList>
-#include <QString>
-#include <QStringList>
-#include <QTextStream>
-
-#include "MYODBCDiaState.h"
-
-class MYODBCDiaRec;
-
-/*!
- \internal
- \brief This is the main handle for diagnostic information.
-
- This contains the diagnostic header fields and 0 - n
- diagnostic records. Each; environment, connection, statement
- and descriptor handle has one of these.
-*/
-class MYODBCDia
-{
- friend class MYODBCDiaRec;
- friend QTextStream &operator<<( QTextStream &stream, const MYODBCDia
&rval );
-public:
- MYODBCDia();
- ~MYODBCDia();
-
- /* header fields... */
- SQLRETURN setCursorRowCount( SQLINTEGER nCursorRowCount );
- SQLRETURN setDynamicFunctionCode( SQLINTEGER nDynamicFunctionCode );
- SQLRETURN setReturnCode( SQLRETURN nReturn );
- SQLRETURN setRowCount( SQLINTEGER nRowCount );
- /* record fields... */
- /* N/A (only set by doAppend) */
- /* these are cached so doAppend has them when called... */
- SQLRETURN setConnectionName( const QString &stringConnectionName );
- SQLRETURN setServerName( const QString &stringServerName );
-
- /* these for direct support for odbc api calls (most relevant odbc rules in these)...
*/
- SQLRETURN getDiagRec( SQLSMALLINT nRecNumber /* 1-based */, SQLWCHAR *psSqlstate,
SQLINTEGER *pnNativeErrorPtr, SQLWCHAR *pszMessageText, SQLSMALLINT nBufferLength,
SQLSMALLINT *pnTextLengthPtr );
- SQLRETURN getDiagField( SQLSMALLINT nRecNumber /* 1-based */, SQLSMALLINT
nDiagIdentifier, SQLPOINTER pDiagInfoPtr, SQLSMALLINT nBufferLength, SQLSMALLINT
*pnStringLengthPtr );
- /* header fields... */
- SQLINTEGER getCursorRowCount();
- QString getDynamicFunction(); /*!< String indicating type of SQL
executed (ie "UPDATE WHERE") */
- SQLINTEGER getDynamicFunctionCode();
- SQLINTEGER getNumber(); /*!< The number of status records in records
array. */
- SQLRETURN getReturnCode();
- SQLINTEGER getRowCount();
- /* record fields... */
- QString getClassOrigin( SQLSMALLINT nRecNumber ); /*!< Doc that defines
the class portion of the SQLSTATE val in this rec. */
- SQLINTEGER getColumnNumber( SQLSMALLINT nRecNumber );
- QString getConnectionName( SQLSMALLINT nRecNumber );
- QString getMessageText( SQLSMALLINT nRecNumber ); /*!< Formatted,
informational message on the error or warning. No max length.
*/
- QString getMessage( SQLSMALLINT nRecNumber ); /*!< Unformatted,
informational message on the error or warning. Should be !> SQL_MAX_MESSAGE_LENGTH
*/
- SQLINTEGER getNative( SQLSMALLINT nRecNumber );
- SQLINTEGER getRowNumber( SQLSMALLINT nRecNumber );
- QString getServerName( SQLSMALLINT nRecNumber );
- QString getSQLState( SQLSMALLINT nRecNumber ); /*!< A five-character
SQLSTATE diagnostic code. */
- QString getSubClassOrigin( SQLSMALLINT nRecNumber);
- /* these are cached so doAppend has them when called... */
- QString getConnectionName();
- QString getServerName();
-
- SQLRETURN doAppend( MYODBC_DIA_ID nState, SQLINTEGER nNative = 0, const QString
&stringMessage = QString::null );
- SQLRETURN doAppend( MYODBC_DIA_ID nState, SQLINTEGER nNative, const QString
&stringMessage, SQLINTEGER nRowNumber, SQLINTEGER nColumnNumber );
- void doClear();
- SQLRETURN doDelete( SQLSMALLINT nRecNumber );
-
-protected:
- SQLINTEGER nCursorRowCount; /*!< Count of rows in the cursor.
*/
- SQLINTEGER nDynamicFunctionCode; /*!< Code indicating type of SQL executed (ie
SQL_DIAG_UPDATE_WHERE) */
- SQLRETURN nReturnCode; /*!< Return code (as in SQLRETURN) returned by
the function. */
- SQLINTEGER nRowCount; /*!< The number of rows affected by an insert,
delete, or update. */
-
- /* these values are copied by new records */
- QString stringConnectionName; /*!< This is dbc->server.
*/
- QString stringServerName; /*!< This is dbc->dsn. Same as
SQL_DATA_SOURCE_NAME in SQLGetInfo(). */
-
- QList<MYODBCDiaRec*> listRecords;/*!< the records we own
*/
-};
-
-
-#endif
-
-
Modified: MYSQLCC/MYSQLCCLib/MYSQLCCLib.vpj
===================================================================
--- MYSQLCC/MYSQLCCLib/MYSQLCCLib.vpj 2006-04-26 19:24:01 UTC (rev 126)
+++ MYSQLCC/MYSQLCCLib/MYSQLCCLib.vpj 2006-04-26 19:29:51 UTC (rev 127)
@@ -63,6 +63,8 @@
<F N="MDesRecARD.cpp"/>
<F N="MDesRecIPD.cpp"/>
<F N="MDesRecIRD.cpp"/>
+ <F N="MDiagnostic.cpp"/>
+ <F N="MDiagnosticRecord.cpp"/>
<F N="MEnvironment.cpp"/>
<F N="MStatement.cpp"/>
</Folder>
@@ -78,6 +80,7 @@
<F N="MDesRecARD.h"/>
<F N="MDesRecIPD.h"/>
<F N="MDesRecIRD.h"/>
+ <F N="MDiagnosticRecord.h"/>
<F N="MInternal.h"/>
</Folder>
<Folder
Added: MYSQLCC/include/MDiagnostic.h
===================================================================
--- MYSQLCC/include/MDiagnostic.h 2006-04-26 19:24:01 UTC (rev 126)
+++ MYSQLCC/include/MDiagnostic.h 2006-04-26 19:29:51 UTC (rev 127)
@@ -0,0 +1,116 @@
+/*! \file MYODBCDia.h
+ \author Peter Harvey <pharvey@stripped>
+ \brief This code is used to support diagnostic information
+ associated with various handles.
+
+ This code is for internal use and as such is for MyODBC
+ developers only.
+
+ 0 - n diagnostic records can be associated with the following
+ ODBC handles;
+
+ - Environment
+ - Connection
+ - Statement
+ - Descriptor
+
+ Diagnostic information can be retreived by calling;
+
+ - SQLGetDiagRec
+ - SQLGetDiagField
+
+ Diagnostic information, if any, should be retreived immediatly after
+ calling an ODBC function because it will be lost when more ODBC
+ functions are called. The exceptions to this are SQLGetDiagRec and
+ SQLGetDiagField - these functions never clear diagnostic information.
+*/
+
+#ifndef MYODBC_DIA_H
+#define MYODBC_DIA_H
+
+#include <MYODBCC.h>
+#include <MYODBCDbg.h>
+
+#include <QList>
+#include <QString>
+#include <QStringList>
+#include <QTextStream>
+
+#include "MYODBCDiaState.h"
+
+class MYODBCDiaRec;
+
+/*!
+ \internal
+ \brief This is the main handle for diagnostic information.
+
+ This contains the diagnostic header fields and 0 - n
+ diagnostic records. Each; environment, connection, statement
+ and descriptor handle has one of these.
+*/
+class MYODBCDia
+{
+ friend class MYODBCDiaRec;
+ friend QTextStream &operator<<( QTextStream &stream, const MYODBCDia
&rval );
+public:
+ MYODBCDia();
+ ~MYODBCDia();
+
+ /* header fields... */
+ SQLRETURN setCursorRowCount( SQLINTEGER nCursorRowCount );
+ SQLRETURN setDynamicFunctionCode( SQLINTEGER nDynamicFunctionCode );
+ SQLRETURN setReturnCode( SQLRETURN nReturn );
+ SQLRETURN setRowCount( SQLINTEGER nRowCount );
+ /* record fields... */
+ /* N/A (only set by doAppend) */
+ /* these are cached so doAppend has them when called... */
+ SQLRETURN setConnectionName( const QString &stringConnectionName );
+ SQLRETURN setServerName( const QString &stringServerName );
+
+ /* these for direct support for odbc api calls (most relevant odbc rules in these)...
*/
+ SQLRETURN getDiagRec( SQLSMALLINT nRecNumber /* 1-based */, SQLWCHAR *psSqlstate,
SQLINTEGER *pnNativeErrorPtr, SQLWCHAR *pszMessageText, SQLSMALLINT nBufferLength,
SQLSMALLINT *pnTextLengthPtr );
+ SQLRETURN getDiagField( SQLSMALLINT nRecNumber /* 1-based */, SQLSMALLINT
nDiagIdentifier, SQLPOINTER pDiagInfoPtr, SQLSMALLINT nBufferLength, SQLSMALLINT
*pnStringLengthPtr );
+ /* header fields... */
+ SQLINTEGER getCursorRowCount();
+ QString getDynamicFunction(); /*!< String indicating type of SQL
executed (ie "UPDATE WHERE") */
+ SQLINTEGER getDynamicFunctionCode();
+ SQLINTEGER getNumber(); /*!< The number of status records in records
array. */
+ SQLRETURN getReturnCode();
+ SQLINTEGER getRowCount();
+ /* record fields... */
+ QString getClassOrigin( SQLSMALLINT nRecNumber ); /*!< Doc that defines
the class portion of the SQLSTATE val in this rec. */
+ SQLINTEGER getColumnNumber( SQLSMALLINT nRecNumber );
+ QString getConnectionName( SQLSMALLINT nRecNumber );
+ QString getMessageText( SQLSMALLINT nRecNumber ); /*!< Formatted,
informational message on the error or warning. No max length.
*/
+ QString getMessage( SQLSMALLINT nRecNumber ); /*!< Unformatted,
informational message on the error or warning. Should be !> SQL_MAX_MESSAGE_LENGTH
*/
+ SQLINTEGER getNative( SQLSMALLINT nRecNumber );
+ SQLINTEGER getRowNumber( SQLSMALLINT nRecNumber );
+ QString getServerName( SQLSMALLINT nRecNumber );
+ QString getSQLState( SQLSMALLINT nRecNumber ); /*!< A five-character
SQLSTATE diagnostic code. */
+ QString getSubClassOrigin( SQLSMALLINT nRecNumber);
+ /* these are cached so doAppend has them when called... */
+ QString getConnectionName();
+ QString getServerName();
+
+ SQLRETURN doAppend( MYODBC_DIA_ID nState, SQLINTEGER nNative = 0, const QString
&stringMessage = QString::null );
+ SQLRETURN doAppend( MYODBC_DIA_ID nState, SQLINTEGER nNative, const QString
&stringMessage, SQLINTEGER nRowNumber, SQLINTEGER nColumnNumber );
+ void doClear();
+ SQLRETURN doDelete( SQLSMALLINT nRecNumber );
+
+protected:
+ SQLINTEGER nCursorRowCount; /*!< Count of rows in the cursor.
*/
+ SQLINTEGER nDynamicFunctionCode; /*!< Code indicating type of SQL executed (ie
SQL_DIAG_UPDATE_WHERE) */
+ SQLRETURN nReturnCode; /*!< Return code (as in SQLRETURN) returned by
the function. */
+ SQLINTEGER nRowCount; /*!< The number of rows affected by an insert,
delete, or update. */
+
+ /* these values are copied by new records */
+ QString stringConnectionName; /*!< This is dbc->server.
*/
+ QString stringServerName; /*!< This is dbc->dsn. Same as
SQL_DATA_SOURCE_NAME in SQLGetInfo(). */
+
+ QList<MYODBCDiaRec*> listRecords;/*!< the records we own
*/
+};
+
+
+#endif
+
+
| Thread |
|---|
| • Connector/ODBC 5 commit: r127 - in MYSQLCC: . MYSQLCCLib include | pharvey | 26 Apr |