List:Commits« Previous MessageNext Message »
From:pharvey Date:October 6 2006 4:49pm
Subject:Connector/ODBC 5 commit: r576 - in trunk: . SDK/C/Library SDK/C/include SDK/MYSQLPlus/Library
View as plain text  
Modified:
   trunk/SDK/C/Library/MYODBCC.cpp
   trunk/SDK/C/include/MYODBCC.h
   trunk/SDK/MYSQLPlus/Library/MDiagnostic.cpp
   trunk/SDK/MYSQLPlus/Library/MDiagnostic.h
   trunk/SDK/MYSQLPlus/Library/MDiagnosticRecord.cpp
   trunk/SDK/MYSQLPlus/Library/MStatement.cpp
   trunk/connector-odbc.vpw
Log:
FIX: Started to implement support for ODBC v2 applications. 

Modified: trunk/SDK/C/Library/MYODBCC.cpp
===================================================================
--- trunk/SDK/C/Library/MYODBCC.cpp	2006-10-05 21:04:43 UTC (rev 575)
+++ trunk/SDK/C/Library/MYODBCC.cpp	2006-10-06 16:49:50 UTC (rev 576)
@@ -28,6 +28,249 @@
 */
 #include "../include/MYODBCC.h"
 
+/*!
+    \internal
+    \brief  This is a static table of all SQL, diagnostic, state information for ODBC v2.
+    
+            This static table is referenced using a corresponding numeric
+            identifier \sa MDiagnostic::DIA. The information in this table is used
+            to format diagnostic messages.
+        
+            The number of elements in here should ALWAYS be (MDiagnostic::DIA_MAX - 1).
+    
+    \sa     MDiagnostic::DIA 
+            MDIAGNOSTIC_STATE
+*/
+MYODBC_STATE MYODBCStatesV2[]=
+{
+    {"ISO 9075","01000","01","General warning",SQL_SUCCESS_WITH_INFO},
+    {"ISO 9075","01002","01","Disconnect error",SQL_SUCCESS_WITH_INFO},
+    {"ISO 9075","01003","01","NULL value eliminated in set
function",SQL_SUCCESS_WITH_INFO},
+    {"ISO 9075","01004","01","Data truncated",SQL_SUCCESS_WITH_INFO},
+    {"ISO 9075","01006","01","Privilege not revoked",SQL_SUCCESS_WITH_INFO},
+    {"ISO 9075","01S00","01","Invalid connection string
attribute",SQL_SUCCESS_WITH_INFO},
+    {"ISO 9075","01S01","01","Error in row",SQL_SUCCESS_WITH_INFO},
+    {"ISO 9075","01S02","01","Option value changed",SQL_SUCCESS_WITH_INFO},
+    {"ISO 9075","01S03","01","No rows updated or delete",SQL_SUCCESS_WITH_INFO},
+    {"ISO 9075","01S04","01","More than one row updated or
deleted",SQL_SUCCESS_WITH_INFO},
+    {"ISO 9075","07001","07","Wrong number of parameters",SQL_ERROR},
+    {"ISO 9075","07006","07","Restricted data type attribute violation",SQL_ERROR},
+    {"ISO 9075","08001","08","Unable to connect to data source",SQL_ERROR},
+    {"ISO 9075","08002","08","Connection in use",SQL_ERROR},
+    {"ISO 9075","08003","08","Connection not open",SQL_ERROR},
+    {"ISO 9075","08004","08","Data source rejected establishment of
connection",SQL_ERROR},
+    {"ISO 9075","08007","08","Connection failure during transaction",SQL_ERROR},
+    {"ISO 9075","08S01","08","Communication link failure",SQL_ERROR},
+    {"ISO 9075","21S01","21","Insert value list does not match column list",SQL_ERROR},
+    {"ISO 9075","21S02","21","Degree of derived table does not match column
list",SQL_ERROR},
+    {"ISO 9075","22001","22","String data right-truncated",SQL_ERROR},
+    {"ISO 9075","22003","22","Numeric value out of range",SQL_ERROR},
+    {"ISO 9075","22005","22","Error in assignment",SQL_ERROR},
+    {"ISO 9075","22008","22","Datetime field overflow",SQL_ERROR},
+    {"ISO 9075","22012","22","Division by zero",SQL_ERROR},
+    {"ISO 9075","22026","22","String data length mismatch",SQL_ERROR},
+    {"ISO 9075","23000","23","Integrity constraint violation",SQL_ERROR},
+    {"ISO 9075","24000","24","Invalid cursor state",SQL_ERROR},
+    {"ISO 9075","25000","25","Invalid transaction state",SQL_ERROR},
+    {"ISO 9075","28000","28","Invalid authorization specification",SQL_ERROR},
+    {"ISO 9075","34000","34","Invalid cursor name",SQL_ERROR},
+    {"ISO 9075","37000","37","Syntax error or access violation",SQL_ERROR},
+    {"ISO 9075","3C000","3C","Duplicate cursor name",SQL_ERROR},
+    {"ISO 9075","3F000","3F","Invalid schema name",SQL_ERROR},
+    {"ISO 9075","40001","40","Serialization failure",SQL_ERROR},
+    {"ISO 9075","42000","42","Syntax error or access violation",SQL_ERROR},
+    {"ISO 9075","70100","70","Operation aborted",SQL_ERROR},
+    {"ISO 9075","IM001","IM","Driver does not support this function",SQL_ERROR},
+    {"ISO 9075","IM002","IM","Data source name not found and no default driver
specified",SQL_ERROR},
+    {"ISO 9075","IM003","IM","Specified driver could not be loaded",SQL_ERROR},
+    {"ISO 9075","IM004","IM","Driver's SQLAllocEnv failed",SQL_ERROR},
+    {"ISO 9075","IM005","IM","Driver's SQLAllocConnect failed",SQL_ERROR},
+    {"ISO 9075","IM006","IM","Driver's SQLSetConnectOption failed",SQL_ERROR},
+    {"ISO 9075","IM007","IM","No data source or driver specified; dialog
prohibited",SQL_ERROR},
+    {"ISO 9075","IM008","IM","Dialog failed",SQL_ERROR},
+    {"ISO 9075","IM009","IM","Unable to load translation DLL",SQL_ERROR},
+    {"ISO 9075","IM010","IM","Data source name too long",SQL_ERROR},
+    {"ISO 9075","IM011","IM","Driver name too long",SQL_ERROR},
+    {"ISO 9075","IM012","IM","DRIVER keyword syntax error",SQL_ERROR},
+    {"ISO 9075","IM013","IM","Trace file error",SQL_ERROR},
+    {"ISO 9075","S0001","S0","Base table or view already exists",SQL_ERROR},
+    {"ISO 9075","S0002","S0","Base table not found",SQL_ERROR},
+    {"ISO 9075","S0011","S0","Index already exists",SQL_ERROR},
+    {"ISO 9075","S0012","S0","Index not found",SQL_ERROR},
+    {"ISO 9075","S0021","S0","Column already exists",SQL_ERROR},
+    {"ISO 9075","S0022","S0","Column not found",SQL_ERROR},
+    {"ISO 9075","S0023","S0","No default for column",SQL_ERROR},
+    {"ISO 9075","S1000","S1","General error",SQL_ERROR},
+    {"ISO 9075","S1001","S1","Memory allocation error",SQL_ERROR},
+    {"ISO 9075","S1002","S1","Invalid column number",SQL_ERROR},
+    {"ISO 9075","S1003","S1","Program type out of range",SQL_ERROR},
+    {"ISO 9075","S1004","S1","SQL data type out of range",SQL_ERROR},
+    {"ISO 9075","S1008","S1","Operation canceled",SQL_ERROR},
+    {"ISO 9075","S1009","S1","Invalid argument value",SQL_ERROR},
+    {"ISO 9075","S1010","S1","Function sequence error",SQL_ERROR},
+    {"ISO 9075","S1011","S1","Operation invalid at this time",SQL_ERROR},
+    {"ISO 9075","S1012","S1","Invalid transaction operation code specified",SQL_ERROR},
+    {"ISO 9075","S1015","S1","No cursor name available",SQL_ERROR},
+    {"ISO 9075","S1090","S1","Invalid string or buffer length",SQL_ERROR},
+    {"ISO 9075","S1091","S1","Descriptor type out of range",SQL_ERROR},
+    {"ISO 9075","S1092","S1","Option type out of range",SQL_ERROR},
+    {"ISO 9075","S1093","S1","Inavlid parameter number",SQL_ERROR},
+    {"ISO 9075","S1094","S1","Invalid scale value",SQL_ERROR},
+    {"ISO 9075","S1095","S1","Function type out of range",SQL_ERROR},
+    {"ISO 9075","S1096","S1","Information type out of range",SQL_ERROR},
+    {"ISO 9075","S1097","S1","Column type out of range",SQL_ERROR},
+    {"ISO 9075","S1098","S1","Scope type out of range",SQL_ERROR},
+    {"ISO 9075","S1099","S1","Nullable type out of range",SQL_ERROR},
+    {"ISO 9075","S1100","S1","Uniqueness option type out of range",SQL_ERROR},
+    {"ISO 9075","S1101","S1","Accuracy option type out of range",SQL_ERROR},
+    {"ISO 9075","S1103","S1","Direction option out of range",SQL_ERROR},
+    {"ISO 9075","S1104","S1","Invalid precision value",SQL_ERROR},
+    {"ISO 9075","S1105","S1","Invalid parameter type",SQL_ERROR},
+    {"ISO 9075","S1106","S1","Fetch type out of range",SQL_ERROR},
+    {"ISO 9075","S1107","S1","Row value out of range",SQL_ERROR},
+    {"ISO 9075","S1108","S1","Concurrency option out of range",SQL_ERROR},
+    {"ISO 9075","S1109","S1","Invalid cursor position",SQL_ERROR},
+    {"ISO 9075","S1110","S1","Invalid driver completion",SQL_ERROR},
+    {"ISO 9075","S1111","S1","Invalid bookmark value",SQL_ERROR},
+    {"ISO 9075","S1C00","S1","Driver not capable",SQL_ERROR},
+    {"ISO 9075","S1T00","S1","Timeout expired",SQL_ERROR}
+};
+
+/*!
+    \internal
+    \brief  This is a static table of all SQL, diagnostic, state information.
+    
+            This static table is referenced using a corresponding numeric
+            identifier \sa MDiagnostic::DIA. The information in this table is used
+            to format diagnostic messages.
+        
+            The number of elements in here should ALWAYS be (MDiagnostic::DIA_MAX - 1).
+    
+    \sa     MDiagnostic::DIA 
+            MDIAGNOSTIC_STATE
+*/
+MYODBC_STATE MYODBCStatesV3[]=
+{
+    {"ISO 9075","01000","01","General warning",SQL_SUCCESS_WITH_INFO},
+    {"ISO 9075","01001","01","Cursor operation conflict",SQL_SUCCESS_WITH_INFO},
+    {"ISO 9075","01002","01","Disconnect error",SQL_SUCCESS_WITH_INFO},
+    {"ISO 9075","01003","01","NULL value eliminated in set
function",SQL_SUCCESS_WITH_INFO},
+    {"ISO 9075","01004","01","String data right-truncated",SQL_SUCCESS_WITH_INFO},
+    {"ISO 9075","01006","01","Privilege not revoked",SQL_SUCCESS_WITH_INFO},
+    {"ISO 9075","01007","01","Privilege not granted",SQL_SUCCESS_WITH_INFO},
+    {"ISO 9075","01S00","01","Invalid connection string
attribute",SQL_SUCCESS_WITH_INFO},
+    {"ISO 9075","01S01","01","Error in row",SQL_SUCCESS_WITH_INFO},
+    {"ISO 9075","01S02","01","Option value changed",SQL_SUCCESS_WITH_INFO},
+    {"ISO 9075","01S06","01","Attempt to fetch before the result set returned the first
rowset",SQL_SUCCESS_WITH_INFO},
+    {"ISO 9075","01S07","01","Fractional truncation",SQL_SUCCESS_WITH_INFO},
+    {"ISO 9075","01S08","01","Error saving File DSN",SQL_SUCCESS_WITH_INFO},
+    {"ISO 9075","01S09","01","Invalid keyword",SQL_SUCCESS_WITH_INFO},
+    {"ISO 9075","07001","07","Wrong number of parameters",SQL_ERROR},
+    {"ISO 9075","07002","07","COUNT field incorrect",SQL_ERROR},
+    {"ISO 9075","07005","07","Prepared statement not a cursor-specification",SQL_ERROR},
+    {"ISO 9075","07006","07","Restricted data type attribute violation",SQL_ERROR},
+    {"ISO 9075","07009","07","Invalid descriptor index",SQL_ERROR},
+    {"ISO 9075","07S01","07","Invalid use of default parameter",SQL_ERROR},
+    {"ISO 9075","08001","08","Client unable to establish connection",SQL_ERROR},
+    {"ISO 9075","08002","08","Connection name in use",SQL_ERROR},
+    {"ISO 9075","08003","08","Connection does not exist",SQL_ERROR},
+    {"ISO 9075","08004","08","Server rejected the connection",SQL_ERROR},
+    {"ISO 9075","08007","08","Connection failure during transaction",SQL_ERROR},
+    {"ISO 9075","08S01","08","Communication link failure",SQL_ERROR},
+    {"ISO 9075","21S01","21","Insert value list does not match column list",SQL_ERROR},
+    {"ISO 9075","21S02","21","Degree of derived table does not match column
list",SQL_ERROR},
+    {"ISO 9075","22001","22","String data right-truncated",SQL_ERROR},
+    {"ISO 9075","22002","22","Indicator variable required but not supplied",SQL_ERROR},
+    {"ISO 9075","22003","22","Numeric value out of range",SQL_ERROR},
+    {"ISO 9075","22007","22","Invalid datetime format",SQL_ERROR},
+    {"ISO 9075","22008","22","Datetime field overflow",SQL_ERROR},
+    {"ISO 9075","22012","22","Division by zero",SQL_ERROR},
+    {"ISO 9075","22015","22","Interval field overflow",SQL_ERROR},
+    {"ISO 9075","22018","22","Invalid character value for cast specification",SQL_ERROR},
+    {"ISO 9075","22019","22","Invalid escape character",SQL_ERROR},
+    {"ISO 9075","22025","22","Invalid escape sequence",SQL_ERROR},
+    {"ISO 9075","22026","22","String data length mismatch",SQL_ERROR},
+    {"ISO 9075","23000","23","Integrity constraint violation",SQL_ERROR},
+    {"ISO 9075","24000","24","Invalid cursor state",SQL_ERROR},
+    {"ISO 9075","25000","25","Invalid transaction state",SQL_ERROR},
+    {"ISO 9075","25S01","25","Transaction state",SQL_ERROR},
+    {"ISO 9075","25S02","25","Transaction is still active",SQL_ERROR},
+    {"ISO 9075","25S03","25","Transaction is rolled back",SQL_ERROR},
+    {"ISO 9075","28000","28","Invalid authorization specification",SQL_ERROR},
+    {"ISO 9075","34000","34","Invalid cursor name",SQL_ERROR},
+    {"ISO 9075","3C000","3C","Duplicate cursor name",SQL_ERROR},
+    {"ISO 9075","3D000","3D","Invalid catalog name",SQL_ERROR},
+    {"ISO 9075","3F000","3F","Invalid schema name",SQL_ERROR},
+    {"ISO 9075","40001","40","Serialization failure",SQL_ERROR},
+    {"ISO 9075","40002","40","Integrity constraint violation",SQL_ERROR},
+    {"ISO 9075","40003","40","Statement completion unknown",SQL_ERROR},
+    {"ISO 9075","42000","42","Syntax error or access violation",SQL_ERROR},
+    {"ISO 9075","42S01","42","Base table or view already exists",SQL_ERROR},
+    {"ISO 9075","42S02","42","Base table or view not found",SQL_ERROR},
+    {"ISO 9075","42S11","42","Index already exists",SQL_ERROR},
+    {"ISO 9075","42S12","42","Index not found",SQL_ERROR},
+    {"ISO 9075","42S21","42","Column already exists",SQL_ERROR},
+    {"ISO 9075","42S22","42","Column not found",SQL_ERROR},
+    {"ISO 9075","44000","44","WITH CHECK OPTION violation",SQL_ERROR},
+    {"ISO 9075","HY000","HY","General error",SQL_ERROR},
+    {"ISO 9075","HY001","HY","Memory allocation error",SQL_ERROR},
+    {"ISO 9075","HY003","HY","Invalid application buffer type",SQL_ERROR},
+    {"ISO 9075","HY004","HY","Invalid SQL data type",SQL_ERROR},
+    {"ISO 9075","HY007","HY","Associated statement is not prepared",SQL_ERROR},
+    {"ISO 9075","HY008","HY","Operation canceled",SQL_ERROR},
+    {"ISO 9075","HY009","HY","Invalid use of null pointer",SQL_ERROR},
+    {"ISO 9075","HY010","HY","Function sequence error",SQL_ERROR},
+    {"ISO 9075","HY011","HY","Attribute cannot be set now",SQL_ERROR},
+    {"ISO 9075","HY012","HY","Invalid transaction operation code",SQL_ERROR},
+    {"ISO 9075","HY013","HY","Memory management error",SQL_ERROR},
+    {"ISO 9075","HY014","HY","Limit on the number of handles exceeded",SQL_ERROR},
+    {"ISO 9075","HY015","HY","No cursor name available",SQL_ERROR},
+    {"ISO 9075","HY016","HY","Cannot modify an implementation row descriptor",SQL_ERROR},
+    {"ISO 9075","HY017","HY","Invalid use of an automatically allocated descriptor
handle",SQL_ERROR},
+    {"ISO 9075","HY018","HY","Server declined cancel request",SQL_ERROR},
+    {"ISO 9075","HY019","HY","Non-character and non-binary data sent in
pieces",SQL_ERROR},
+    {"ISO 9075","HY020","HY","Attempt to concatenate a null value",SQL_ERROR},
+    {"ISO 9075","HY021","HY","Inconsistent descriptor information",SQL_ERROR},
+    {"ISO 9075","HY024","HY","Invalid attribute value",SQL_ERROR},
+    {"ISO 9075","HY090","HY","Invalid string or buffer length",SQL_ERROR},
+    {"ISO 9075","HY091","HY","Invalid descriptor field identifier",SQL_ERROR},
+    {"ISO 9075","HY092","HY","Invalid attribute/option identifier",SQL_ERROR},
+    {"ISO 9075","HY095","HY","Function type out of range",SQL_ERROR},
+    {"ISO 9075","HY096","HY","Invalid information type",SQL_ERROR},
+    {"ISO 9075","HY097","HY","Column type out of range",SQL_ERROR},
+    {"ISO 9075","HY098","HY","Scope type out of range",SQL_ERROR},
+    {"ISO 9075","HY099","HY","Nullable type out of range",SQL_ERROR},
+    {"ISO 9075","HY100","HY","Uniqueness option type out of range",SQL_ERROR},
+    {"ISO 9075","HY101","HY","Accuracy option type out of range",SQL_ERROR},
+    {"ISO 9075","HY103","HY","Invalid retrieval code",SQL_ERROR},
+    {"ISO 9075","HY104","HY","Invalid precision or scale value",SQL_ERROR},
+    {"ISO 9075","HY105","HY","Invalid parameter type",SQL_ERROR},
+    {"ISO 9075","HY106","HY","Fetch type out of range",SQL_ERROR},
+    {"ISO 9075","HY107","HY","Row value out of range",SQL_ERROR},
+    {"ISO 9075","HY109","HY","Invalid cursor position",SQL_ERROR},
+    {"ISO 9075","HY110","HY","Invalid driver completion",SQL_ERROR},
+    {"ISO 9075","HY111","HY","Invalid bookmark value",SQL_ERROR},
+    {"ISO 9075","HYC00","HY","Optional feature not implemented",SQL_ERROR},
+    {"ISO 9075","HYT00","HY","Timeout expired",SQL_ERROR},
+    {"ISO 9075","HYT01","HY","Connection timeout expired",SQL_ERROR},
+    {"ODBC 3.0","IM001","IM","Driver does not support this function",SQL_ERROR},
+    {"ODBC 3.0","IM002","IM","Data source name not found and no default driver
specified",SQL_ERROR},
+    {"ODBC 3.0","IM003","IM","Specified driver could not be loaded",SQL_ERROR},
+    {"ODBC 3.0","IM004","IM","Driver's SQLAllocHandle on SQL_HANDLE_ENV
failed",SQL_ERROR},
+    {"ODBC 3.0","IM005","IM","Driver's SQLAllocHandle on SQL_HANDLE_DBC
failed",SQL_ERROR},
+    {"ODBC 3.0","IM006","IM","Driver's SQLSetConnectAttr failed",SQL_ERROR},
+    {"ODBC 3.0","IM007","IM","No data source or driver specified; dialog
prohibited",SQL_ERROR},
+    {"ODBC 3.0","IM008","IM","Dialog failed",SQL_ERROR},
+    {"ODBC 3.0","IM009","IM","Unable to load translation DLL",SQL_ERROR},
+    {"ODBC 3.0","IM010","IM","Data source name too long",SQL_ERROR},
+    {"ODBC 3.0","IM011","IM","Driver name too long",SQL_ERROR},
+    {"ODBC 3.0","IM012","IM","DRIVER keyword syntax error",SQL_ERROR},
+    {"ODBC 3.0","IM013","IM","Trace file error",SQL_ERROR},
+    {"ODBC 3.0","IM014","IM","Invalid name of File DSN",SQL_ERROR},
+    {"ODBC 3.0","IM015","IM","Corrupt file data source",SQL_ERROR}
+};
+
+
 void *MYODBCC::getMem( size_t nBytes )
 {
     return malloc( nBytes );

Modified: trunk/SDK/C/include/MYODBCC.h
===================================================================
--- trunk/SDK/C/include/MYODBCC.h	2006-10-05 21:04:43 UTC (rev 575)
+++ trunk/SDK/C/include/MYODBCC.h	2006-10-06 16:49:50 UTC (rev 576)
@@ -111,6 +111,25 @@
 #endif
 
 /*!
+    \internal
+    \brief  State information.
+
+            This is used to generate a static 'table' of all state information.
+
+    \sa     MDiagnostic
+*/
+typedef struct tMYODBC_STATE
+{
+  QString   stringClassOrigin;  /*!< SQL_DIAG_CLASS_ORIGIN  */
+  QString   stringSQLState;     /*!< SQL_DIAG_SQLSTATE      */
+  QString   stringClass;
+  QString   stringText;
+  SQLRETURN nReturnCode;        /*!< SQLRETURN              */
+
+} MYODBC_STATE;
+
+
+/*!
     \brief  C API portability and convenience.
 
             This class is basically just a namespace for us to play in. From

Modified: trunk/SDK/MYSQLPlus/Library/MDiagnostic.cpp
===================================================================
--- trunk/SDK/MYSQLPlus/Library/MDiagnostic.cpp	2006-10-05 21:04:43 UTC (rev 575)
+++ trunk/SDK/MYSQLPlus/Library/MDiagnostic.cpp	2006-10-06 16:49:50 UTC (rev 576)
@@ -1,141 +1,6 @@
 #include "MDiagnostic.h"
 
 /*!
-    \internal
-    \brief  This is a static table of all SQL, diagnostic, state information.
-    
-            This static table is referenced using a corresponding numeric
-            identifier \sa MDiagnostic::DIA. The information in this table is used
-            to format diagnostic messages.
-        
-            The number of elements in here should ALWAYS be (MDiagnostic::DIA_MAX - 1).
-    
-    \sa     MDiagnostic::DIA 
-            MDIAGNOSTIC_STATE
-*/
-MDIAGNOSTIC_STATE MDiagnostic_pStates[]=
-{
-    {"ISO 9075","01000","01","General warning",SQL_SUCCESS_WITH_INFO},
-    {"ISO 9075","01001","01","Cursor operation conflict",SQL_SUCCESS_WITH_INFO},
-    {"ISO 9075","01002","01","Disconnect error",SQL_SUCCESS_WITH_INFO},
-    {"ISO 9075","01003","01","NULL value eliminated in set
function",SQL_SUCCESS_WITH_INFO},
-    {"ISO 9075","01004","01","String data right-truncated",SQL_SUCCESS_WITH_INFO},
-    {"ISO 9075","01006","01","Privilege not revoked",SQL_SUCCESS_WITH_INFO},
-    {"ISO 9075","01007","01","Privilege not granted",SQL_SUCCESS_WITH_INFO},
-    {"ISO 9075","01S00","01","Invalid connection string
attribute",SQL_SUCCESS_WITH_INFO},
-    {"ISO 9075","01S01","01","Error in row",SQL_SUCCESS_WITH_INFO},
-    {"ISO 9075","01S02","01","Option value changed",SQL_SUCCESS_WITH_INFO},
-    {"ISO 9075","01S06","01","Attempt to fetch before the result set returned the first
rowset",SQL_SUCCESS_WITH_INFO},
-    {"ISO 9075","01S07","01","Fractional truncation",SQL_SUCCESS_WITH_INFO},
-    {"ISO 9075","01S08","01","Error saving File DSN",SQL_SUCCESS_WITH_INFO},
-    {"ISO 9075","01S09","01","Invalid keyword",SQL_SUCCESS_WITH_INFO},
-    {"ISO 9075","07001","07","Wrong number of parameters",SQL_ERROR},
-    {"ISO 9075","07002","07","COUNT field incorrect",SQL_ERROR},
-    {"ISO 9075","07005","07","Prepared statement not a cursor-specification",SQL_ERROR},
-    {"ISO 9075","07006","07","Restricted data type attribute violation",SQL_ERROR},
-    {"ISO 9075","07009","07","Invalid descriptor index",SQL_ERROR},
-    {"ISO 9075","07S01","07","Invalid use of default parameter",SQL_ERROR},
-    {"ISO 9075","08001","08","Client unable to establish connection",SQL_ERROR},
-    {"ISO 9075","08002","08","Connection name in use",SQL_ERROR},
-    {"ISO 9075","08003","08","Connection does not exist",SQL_ERROR},
-    {"ISO 9075","08004","08","Server rejected the connection",SQL_ERROR},
-    {"ISO 9075","08007","08","Connection failure during transaction",SQL_ERROR},
-    {"ISO 9075","08S01","08","Communication link failure",SQL_ERROR},
-    {"ISO 9075","21S01","21","Insert value list does not match column list",SQL_ERROR},
-    {"ISO 9075","21S02","21","Degree of derived table does not match column
list",SQL_ERROR},
-    {"ISO 9075","22001","22","String data right-truncated",SQL_ERROR},
-    {"ISO 9075","22002","22","Indicator variable required but not supplied",SQL_ERROR},
-    {"ISO 9075","22003","22","Numeric value out of range",SQL_ERROR},
-    {"ISO 9075","22007","22","Invalid datetime format",SQL_ERROR},
-    {"ISO 9075","22008","22","Datetime field overflow",SQL_ERROR},
-    {"ISO 9075","22012","22","Division by zero",SQL_ERROR},
-    {"ISO 9075","22015","22","Interval field overflow",SQL_ERROR},
-    {"ISO 9075","22018","22","Invalid character value for cast specification",SQL_ERROR},
-    {"ISO 9075","22019","22","Invalid escape character",SQL_ERROR},
-    {"ISO 9075","22025","22","Invalid escape sequence",SQL_ERROR},
-    {"ISO 9075","22026","22","String data length mismatch",SQL_ERROR},
-    {"ISO 9075","23000","23","Integrity constraint violation",SQL_ERROR},
-    {"ISO 9075","24000","24","Invalid cursor state",SQL_ERROR},
-    {"ISO 9075","25000","25","Invalid transaction state",SQL_ERROR},
-    {"ISO 9075","25S01","25","Transaction state",SQL_ERROR},
-    {"ISO 9075","25S02","25","Transaction is still active",SQL_ERROR},
-    {"ISO 9075","25S03","25","Transaction is rolled back",SQL_ERROR},
-    {"ISO 9075","28000","28","Invalid authorization specification",SQL_ERROR},
-    {"ISO 9075","34000","34","Invalid cursor name",SQL_ERROR},
-    {"ISO 9075","3C000","3C","Duplicate cursor name",SQL_ERROR},
-    {"ISO 9075","3D000","3D","Invalid catalog name",SQL_ERROR},
-    {"ISO 9075","3F000","3F","Invalid schema name",SQL_ERROR},
-    {"ISO 9075","40001","40","Serialization failure",SQL_ERROR},
-    {"ISO 9075","40002","40","Integrity constraint violation",SQL_ERROR},
-    {"ISO 9075","40003","40","Statement completion unknown",SQL_ERROR},
-    {"ISO 9075","42000","42","Syntax error or access violation",SQL_ERROR},
-    {"ISO 9075","42S01","42","Base table or view already exists",SQL_ERROR},
-    {"ISO 9075","42S02","42","Base table or view not found",SQL_ERROR},
-    {"ISO 9075","42S11","42","Index already exists",SQL_ERROR},
-    {"ISO 9075","42S12","42","Index not found",SQL_ERROR},
-    {"ISO 9075","42S21","42","Column already exists",SQL_ERROR},
-    {"ISO 9075","42S22","42","Column not found",SQL_ERROR},
-    {"ISO 9075","44000","44","WITH CHECK OPTION violation",SQL_ERROR},
-    {"ISO 9075","HY000","HY","General error",SQL_ERROR},
-    {"ISO 9075","HY001","HY","Memory allocation error",SQL_ERROR},
-    {"ISO 9075","HY003","HY","Invalid application buffer type",SQL_ERROR},
-    {"ISO 9075","HY004","HY","Invalid SQL data type",SQL_ERROR},
-    {"ISO 9075","HY007","HY","Associated statement is not prepared",SQL_ERROR},
-    {"ISO 9075","HY008","HY","Operation canceled",SQL_ERROR},
-    {"ISO 9075","HY009","HY","Invalid use of null pointer",SQL_ERROR},
-    {"ISO 9075","HY010","HY","Function sequence error",SQL_ERROR},
-    {"ISO 9075","HY011","HY","Attribute cannot be set now",SQL_ERROR},
-    {"ISO 9075","HY012","HY","Invalid transaction operation code",SQL_ERROR},
-    {"ISO 9075","HY013","HY","Memory management error",SQL_ERROR},
-    {"ISO 9075","HY014","HY","Limit on the number of handles exceeded",SQL_ERROR},
-    {"ISO 9075","HY015","HY","No cursor name available",SQL_ERROR},
-    {"ISO 9075","HY016","HY","Cannot modify an implementation row descriptor",SQL_ERROR},
-    {"ISO 9075","HY017","HY","Invalid use of an automatically allocated descriptor
handle",SQL_ERROR},
-    {"ISO 9075","HY018","HY","Server declined cancel request",SQL_ERROR},
-    {"ISO 9075","HY019","HY","Non-character and non-binary data sent in
pieces",SQL_ERROR},
-    {"ISO 9075","HY020","HY","Attempt to concatenate a null value",SQL_ERROR},
-    {"ISO 9075","HY021","HY","Inconsistent descriptor information",SQL_ERROR},
-    {"ISO 9075","HY024","HY","Invalid attribute value",SQL_ERROR},
-    {"ISO 9075","HY090","HY","Invalid string or buffer length",SQL_ERROR},
-    {"ISO 9075","HY091","HY","Invalid descriptor field identifier",SQL_ERROR},
-    {"ISO 9075","HY092","HY","Invalid attribute/option identifier",SQL_ERROR},
-    {"ISO 9075","HY095","HY","Function type out of range",SQL_ERROR},
-    {"ISO 9075","HY096","HY","Invalid information type",SQL_ERROR},
-    {"ISO 9075","HY097","HY","Column type out of range",SQL_ERROR},
-    {"ISO 9075","HY098","HY","Scope type out of range",SQL_ERROR},
-    {"ISO 9075","HY099","HY","Nullable type out of range",SQL_ERROR},
-    {"ISO 9075","HY100","HY","Uniqueness option type out of range",SQL_ERROR},
-    {"ISO 9075","HY101","HY","Accuracy option type out of range",SQL_ERROR},
-    {"ISO 9075","HY103","HY","Invalid retrieval code",SQL_ERROR},
-    {"ISO 9075","HY104","HY","Invalid precision or scale value",SQL_ERROR},
-    {"ISO 9075","HY105","HY","Invalid parameter type",SQL_ERROR},
-    {"ISO 9075","HY106","HY","Fetch type out of range",SQL_ERROR},
-    {"ISO 9075","HY107","HY","Row value out of range",SQL_ERROR},
-    {"ISO 9075","HY109","HY","Invalid cursor position",SQL_ERROR},
-    {"ISO 9075","HY110","HY","Invalid driver completion",SQL_ERROR},
-    {"ISO 9075","HY111","HY","Invalid bookmark value",SQL_ERROR},
-    {"ISO 9075","HYC00","HY","Optional feature not implemented",SQL_ERROR},
-    {"ISO 9075","HYT00","HY","Timeout expired",SQL_ERROR},
-    {"ISO 9075","HYT01","HY","Connection timeout expired",SQL_ERROR},
-    {"ODBC 3.0","IM001","IM","Driver does not support this function",SQL_ERROR},
-    {"ODBC 3.0","IM002","IM","Data source name not found and no default driver
specified",SQL_ERROR},
-    {"ODBC 3.0","IM003","IM","Specified driver could not be loaded",SQL_ERROR},
-    {"ODBC 3.0","IM004","IM","Driver's SQLAllocHandle on SQL_HANDLE_ENV
failed",SQL_ERROR},
-    {"ODBC 3.0","IM005","IM","Driver's SQLAllocHandle on SQL_HANDLE_DBC
failed",SQL_ERROR},
-    {"ODBC 3.0","IM006","IM","Driver's SQLSetConnectAttr failed",SQL_ERROR},
-    {"ODBC 3.0","IM007","IM","No data source or driver specified; dialog
prohibited",SQL_ERROR},
-    {"ODBC 3.0","IM008","IM","Dialog failed",SQL_ERROR},
-    {"ODBC 3.0","IM009","IM","Unable to load translation DLL",SQL_ERROR},
-    {"ODBC 3.0","IM010","IM","Data source name too long",SQL_ERROR},
-    {"ODBC 3.0","IM011","IM","Driver name too long",SQL_ERROR},
-    {"ODBC 3.0","IM012","IM","DRIVER keyword syntax error",SQL_ERROR},
-    {"ODBC 3.0","IM013","IM","Trace file error",SQL_ERROR},
-    {"ODBC 3.0","IM014","IM","Invalid name of File DSN",SQL_ERROR},
-    {"ODBC 3.0","IM015","IM","Corrupt file data source",SQL_ERROR}
-};
-
-
-/*!
     \brief  Allocates a new diagnostics structure.
 
             Allocates and initializes a new diagnostics 

Modified: trunk/SDK/MYSQLPlus/Library/MDiagnostic.h
===================================================================
--- trunk/SDK/MYSQLPlus/Library/MDiagnostic.h	2006-10-05 21:04:43 UTC (rev 575)
+++ trunk/SDK/MYSQLPlus/Library/MDiagnostic.h	2006-10-06 16:49:50 UTC (rev 576)
@@ -226,6 +226,72 @@
         DIA_MAX
     };
 
+
+
+
+01S03 01001   
+01S04 01001   
+22003 HY019   
+22008 22007   
+22005 22018   
+24000 07005   
+37000 42000   
+70100 HY018   
+S0001 42S01   
+S0002 42S02   
+S0011 42S11   
+S0012 42S12   
+S0021 42S21   
+S0022 42S22   
+S0023 42S23   
+S1000 HY000   
+S1001 HY001   
+S1002 07009 ODBC 2.x SQLSTATE S1002 is mapped to ODBC 3.x SQLSTATE 07009 if the
underlying function is SQLBindCol, SQLColAttribute, SQLExtendedFetch, SQLFetch,
SQLFetchScroll, or SQLGetData. 
+S1003 HY003   
+S1004 HY004   
+S1008 HY008   
+S1009 HY009 Returned for an invalid use of a null pointer. 
+S1009 HY024 Returned for an invalid attribute value. 
+S1009 HY092 Returned for updating or deleting data by a call to SQLSetPos, or adding,
updating, or deleting data by a call to SQLBulkOperations, when the concurrency is
read-only. 
+S1010 HY007
+HY010 SQLSTATE S1010 is mapped to SQLSTATE HY007 when SQLDescribeCol is called prior to
calling SQLPrepare, SQLExecDirect, or a catalog function for the StatementHandle.
Otherwise, SQLSTATE S1010 is mapped to SQLSTATE HY010. 
+S1011 HY011   
+S1012 HY012   
+S1090 HY090   
+S1091 HY091   
+S1092 HY092   
+S1093 07009 ODBC 3.x SQLSTATE 07009 is mapped to ODBC 2.x SQLSTATE S1093 if the
underlying function is SQLBindParameter or SQLDescribeParam. 
+S1096 HY096   
+S1097 HY097   
+S1098 HY098   
+S1099 HY099   
+S1100 HY100   
+S1101 HY101   
+S1103 HY103   
+S1104 HY104   
+S1105 HY105   
+S1106 HY106   
+S1107 HY107   
+S1108 HY108   
+S1109 HY109   
+S1110 HY110   
+S1111 HY111   
+S1C00 HYC00   
+S1T00 HYT00 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
     MDiagnostic( QObject *pObjectParent = NULL );
     ~MDiagnostic();
 

Modified: trunk/SDK/MYSQLPlus/Library/MDiagnosticRecord.cpp
===================================================================
--- trunk/SDK/MYSQLPlus/Library/MDiagnosticRecord.cpp	2006-10-05 21:04:43 UTC (rev 575)
+++ trunk/SDK/MYSQLPlus/Library/MDiagnosticRecord.cpp	2006-10-06 16:49:50 UTC (rev 576)
@@ -1,6 +1,5 @@
 #include "MDiagnosticRecord.h"
 
-
 /*!
     \internal
     \brief  Allocates and initializes a diagnostic record.
@@ -291,7 +290,7 @@
     /* server message */
     if ( nNative )
     {
-        MYODBCDbgReturn3( "%s", (QString( "[%1][%2 %3][%4] %5 %6" )
+        MYODBCDbgReturn1( (QString( "[%1][%2 %3][%4] %5 %6" )
                                 .arg( MYODBC_VENDOR )
                                 .arg( MYODBC_NAME )
                                 .arg( MYODBC_VERSION )
@@ -302,7 +301,7 @@
     /* driver message */
     else
     {
-        MYODBCDbgReturn3( "%s", QString( "[%1][%2 %3] %4" )
+        MYODBCDbgReturn1( QString( "[%1][%2 %3] %4" )
                                 .arg( MYODBC_VENDOR )
                                 .arg( MYODBC_NAME )
                                 .arg( MYODBC_VERSION )

Modified: trunk/SDK/MYSQLPlus/Library/MStatement.cpp
===================================================================
--- trunk/SDK/MYSQLPlus/Library/MStatement.cpp	2006-10-05 21:04:43 UTC (rev 575)
+++ trunk/SDK/MYSQLPlus/Library/MStatement.cpp	2006-10-06 16:49:50 UTC (rev 576)
@@ -807,12 +807,23 @@
 SQLRETURN MStatement::getDiagField( SQLSMALLINT nRecNumber, SQLSMALLINT nDiagIdentifier,
SQLPOINTER pDiagInfo, SQLSMALLINT nBufferLength, SQLSMALLINT *pnStringLength )
 {
     MYODBCDbgEnter();
+
+#if MYODBC_DBG > 1
+    MYODBCDbgInfo( QString( "nRecNumber=%1" ).arg( nRecNumber ) );
+    MYODBCDbgInfo( QString( "nDiagIdentifier=%1=%2" ).arg( nDiagIdentifier ).arg(
MYODBCC::getDiagFieldString( nDiagIdentifier ) ) );
+#endif
+
     MYODBCDbgReturn( getDiagnostic()->getDiagField( nRecNumber, nDiagIdentifier,
pDiagInfo, nBufferLength, pnStringLength ) );
 }
 
 SQLRETURN MStatement::getDiagRec( SQLSMALLINT nRecNumber, SQLWCHAR *psSQLState,
SQLINTEGER *pnNativeError, SQLWCHAR *psMessageText, SQLSMALLINT nBufferLength,
SQLSMALLINT *pnTextLength )
 {
     MYODBCDbgEnter();
+
+#if MYODBC_DBG > 1
+    MYODBCDbgInfo( QString( "nRecNumber=%1" ).arg( nRecNumber ) );
+#endif
+
     MYODBCDbgReturn( getDiagnostic()->getDiagRec( nRecNumber, psSQLState,
pnNativeError, psMessageText, nBufferLength, pnTextLength ) )
 }
 

Modified: trunk/connector-odbc.vpw
===================================================================
--- trunk/connector-odbc.vpw	2006-10-05 21:04:43 UTC (rev 575)
+++ trunk/connector-odbc.vpw	2006-10-06 16:49:50 UTC (rev 576)
@@ -1,31 +1,30 @@
 <!DOCTYPE Workspace SYSTEM "http://www.slickedit.com/dtd/vse/10.0/vpw.dtd">
 <Workspace Version="10.0" VendorName="SlickEdit">
 	<Projects>
-		<Project File="SDK/C/C.vpj"/>
-		<Project File="SDK/C/Library/CLibrary.vpj"/>
-		<Project File="connector-odbc.vpj"/>
-		<Project File="SDK/C/Tests/CTests.vpj"/>
-		<Project File="SDK/Dbg/Dbg.vpj"/>
-		<Project File="SDK/Dbg/Library/DbgLibrary.vpj"/>
-		<Project File="SDK/Dbg/Tests/DbgTests.vpj"/>
-		<Project File="Tools/dltest/dltest.vpj"/>
-		<Project File="Driver/Driver/Driver.vpj"/>
-		<Project File="Driver/Driver/Library/DriverLibrary.vpj"/>
-		<Project File="Driver/Driver/Tests/DriverTests.vpj"/>
-		<Project File="SDK/Installer/Ins.vpj"/>
-		<Project File="SDK/Installer/Library/InsLibrary.vpj"/>
-		<Project File="Tools/Installer/Installer.vpj"/>
-		<Project File="SDK/Installer/Tests/InsTests.vpj"/>
-		<Project File="../../connector-odbc3/myodbc3/myodbc3.vpj"/>
-		<Project File="../../mysql-include.vpj"/>
-		<Project File="SDK/MYSQLPlus/MYSQLPlus.vpj"/>
-		<Project File="SDK/MYSQLPlus/Library/MYSQLPlusLibrary.vpj"/>
-		<Project File="SDK/MYSQLPlus/Tests/MYSQLPlusTests.vpj"/>
-		<Project File="Driver/Setup/Setup.vpj"/>
-		<Project File="Driver/Setup/Library/SetupLibrary.vpj"/>
-		<Project File="Driver/Setup/Tests/SetupTests.vpj"/>
-		<Project File="Tools/Shell/Shell.vpj"/>
-		<Project File="SDK/Tst/Tst.vpj"/>
-		<Project File="SDK/Tst/Library/TstLibrary.vpj"/>
+		<Project File="SDK/C/C.vpj" />
+		<Project File="SDK/C/Library/CLibrary.vpj" />
+		<Project File="connector-odbc.vpj" />
+		<Project File="SDK/C/Tests/CTests.vpj" />
+		<Project File="SDK/Dbg/Dbg.vpj" />
+		<Project File="SDK/Dbg/Library/DbgLibrary.vpj" />
+		<Project File="SDK/Dbg/Tests/DbgTests.vpj" />
+		<Project File="Tools/dltest/dltest.vpj" />
+		<Project File="Driver/Driver/Driver.vpj" />
+		<Project File="Driver/Driver/Library/DriverLibrary.vpj" />
+		<Project File="Driver/Driver/Tests/DriverTests.vpj" />
+		<Project File="SDK/Installer/Ins.vpj" />
+		<Project File="SDK/Installer/Library/InsLibrary.vpj" />
+		<Project File="Tools/Installer/Installer.vpj" />
+		<Project File="SDK/Installer/Tests/InsTests.vpj" />
+		<Project File="../../mysql-include.vpj" />
+		<Project File="SDK/MYSQLPlus/MYSQLPlus.vpj" />
+		<Project File="SDK/MYSQLPlus/Library/MYSQLPlusLibrary.vpj" />
+		<Project File="SDK/MYSQLPlus/Tests/MYSQLPlusTests.vpj" />
+		<Project File="Driver/Setup/Setup.vpj" />
+		<Project File="Driver/Setup/Library/SetupLibrary.vpj" />
+		<Project File="Driver/Setup/Tests/SetupTests.vpj" />
+		<Project File="Tools/Shell/Shell.vpj" />
+		<Project File="SDK/Tst/Tst.vpj" />
+		<Project File="SDK/Tst/Library/TstLibrary.vpj" />
 	</Projects>
 </Workspace>

Thread
Connector/ODBC 5 commit: r576 - in trunk: . SDK/C/Library SDK/C/include SDK/MYSQLPlus/Librarypharvey6 Oct