]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/db.cpp
Attempt to implement a bunch of wx string.h equivalents.
[wxWidgets.git] / src / common / db.cpp
index 080b6c44ba2b2546303d7edacea8f8c2a1b9dc76..0096ce8eb33735d44b8b0b665fc51e6ed4d65a3c 100644 (file)
@@ -56,7 +56,7 @@
 #include <ctype.h>
 #include "wx/db.h"
 
-DbList *PtrBegDbList = 0;
+DbList* WXDLLEXPORT PtrBegDbList = 0;
 
 /********** wxDB Constructor **********/
 wxDB::wxDB(HENV &aHenv)
@@ -319,7 +319,7 @@ bool wxDB::getDbInfo(void)
        if (SQLGetInfo(hdbc, SQL_DBMS_NAME, (UCHAR*) dbInf.dbmsName, 40, &cb) != SQL_SUCCESS)
                return(DispAllErrors(henv, hdbc));
 
-       if (SQLGetInfo(hdbc, SQL_DBMS_VER, (UCHAR*) dbInf.dbmsVer, 20, &cb) != SQL_SUCCESS)
+       if (SQLGetInfo(hdbc, SQL_DBMS_VER, (UCHAR*) dbInf.dbmsVer, 40, &cb) != SQL_SUCCESS)
                return(DispAllErrors(henv, hdbc));
 
        if (SQLGetInfo(hdbc, SQL_ACTIVE_CONNECTIONS, (UCHAR*) &dbInf.maxConnections, sizeof(dbInf.maxConnections), &cb) != SQL_SUCCESS)
@@ -331,13 +331,13 @@ bool wxDB::getDbInfo(void)
        if (SQLGetInfo(hdbc, SQL_DRIVER_NAME, (UCHAR*) dbInf.driverName, 40, &cb) != SQL_SUCCESS)
                return(DispAllErrors(henv, hdbc));
 
-       if (SQLGetInfo(hdbc, SQL_DRIVER_ODBC_VER, (UCHAR*) dbInf.odbcVer, 20, &cb) != SQL_SUCCESS)
+       if (SQLGetInfo(hdbc, SQL_DRIVER_ODBC_VER, (UCHAR*) dbInf.odbcVer, 60, &cb) == SQL_ERROR)
                return(DispAllErrors(henv, hdbc));
 
-       if (SQLGetInfo(hdbc, SQL_ODBC_VER, (UCHAR*) dbInf.drvMgrOdbcVer, 20, &cb) != SQL_SUCCESS)
+       if (SQLGetInfo(hdbc, SQL_ODBC_VER, (UCHAR*) dbInf.drvMgrOdbcVer, 60, &cb) == SQL_ERROR)
                return(DispAllErrors(henv, hdbc));
 
-       if (SQLGetInfo(hdbc, SQL_DRIVER_VER, (UCHAR*) dbInf.driverVer, 40, &cb) != SQL_SUCCESS)
+       if (SQLGetInfo(hdbc, SQL_DRIVER_VER, (UCHAR*) dbInf.driverVer, 60, &cb) == SQL_ERROR)
                return(DispAllErrors(henv, hdbc));
 
        if (SQLGetInfo(hdbc, SQL_ODBC_API_CONFORMANCE, (UCHAR*) &dbInf.apiConfLvl, sizeof(dbInf.apiConfLvl), &cb) != SQL_SUCCESS)
@@ -1353,7 +1353,7 @@ bool wxDB::WriteSqlLog(char *logMsg)
 
 
 /********** GetDbConnection() **********/
-wxDB *GetDbConnection(DbStuff *pDbStuff)
+wxDB* WXDLLEXPORT GetDbConnection(DbStuff *pDbStuff)
 {
        DbList *pList;
 
@@ -1413,7 +1413,7 @@ wxDB *GetDbConnection(DbStuff *pDbStuff)
 }  // GetDbConnection()
 
 /********** FreeDbConnection() **********/
-bool FreeDbConnection(wxDB *pDb)
+bool WXDLLEXPORT FreeDbConnection(wxDB *pDb)
 {
        DbList *pList;
 
@@ -1430,7 +1430,7 @@ bool FreeDbConnection(wxDB *pDb)
 }  // FreeDbConnection()
 
 /********** CloseDbConnections() **********/
-void CloseDbConnections(void)
+void WXDLLEXPORT CloseDbConnections(void)
 {
        DbList *pList, *pNext;
        
@@ -1450,7 +1450,7 @@ void CloseDbConnections(void)
 }  // CloseDbConnections()
 
 /********** NumberDbConnectionsInUse() **********/
-int NumberDbConnectionsInUse(void)
+int WXDLLEXPORT NumberDbConnectionsInUse(void)
 {
        DbList *pList;
        int cnt = 0;