Commit 4a1ffc38 authored by Olivier Bertrand's avatar Olivier Bertrand

Add forgotten changes made on 10.1

parent 5af076e5
...@@ -80,6 +80,10 @@ ...@@ -80,6 +80,10 @@
#define NODBC #define NODBC
#include "tabodbc.h" #include "tabodbc.h"
#endif // ODBC_SUPPORT #endif // ODBC_SUPPORT
#if defined(JDBC_SUPPORT)
#define NJDBC
#include "tabjdbc.h"
#endif // ODBC_SUPPORT
#if defined(PIVOT_SUPPORT) #if defined(PIVOT_SUPPORT)
#include "tabpivot.h" #include "tabpivot.h"
#endif // PIVOT_SUPPORT #endif // PIVOT_SUPPORT
...@@ -139,6 +143,9 @@ TABTYPE GetTypeID(const char *type) ...@@ -139,6 +143,9 @@ TABTYPE GetTypeID(const char *type)
: (!stricmp(type, "VEC")) ? TAB_VEC : (!stricmp(type, "VEC")) ? TAB_VEC
#ifdef ODBC_SUPPORT #ifdef ODBC_SUPPORT
: (!stricmp(type, "ODBC")) ? TAB_ODBC : (!stricmp(type, "ODBC")) ? TAB_ODBC
#endif
#ifdef JDBC_SUPPORT
: (!stricmp(type, "JDBC")) ? TAB_JDBC
#endif #endif
: (!stricmp(type, "MYSQL")) ? TAB_MYSQL : (!stricmp(type, "MYSQL")) ? TAB_MYSQL
: (!stricmp(type, "MYPRX")) ? TAB_MYSQL : (!stricmp(type, "MYPRX")) ? TAB_MYSQL
...@@ -301,12 +308,12 @@ int GetIndexType(TABTYPE type) ...@@ -301,12 +308,12 @@ int GetIndexType(TABTYPE type)
break; break;
case TAB_MYSQL: case TAB_MYSQL:
case TAB_ODBC: case TAB_ODBC:
case TAB_JDBC:
xtyp= 2; xtyp= 2;
break; break;
case TAB_VIR: case TAB_VIR:
xtyp= 3; xtyp= 3;
break; break;
// case TAB_ODBC:
default: default:
xtyp= 0; xtyp= 0;
break; break;
...@@ -558,6 +565,9 @@ PRELDEF MYCAT::MakeTableDesc(PGLOBAL g, PTABLE tablep, LPCSTR am) ...@@ -558,6 +565,9 @@ PRELDEF MYCAT::MakeTableDesc(PGLOBAL g, PTABLE tablep, LPCSTR am)
#if defined(ODBC_SUPPORT) #if defined(ODBC_SUPPORT)
case TAB_ODBC: tdp= new(g) ODBCDEF; break; case TAB_ODBC: tdp= new(g) ODBCDEF; break;
#endif // ODBC_SUPPORT #endif // ODBC_SUPPORT
#if defined(JDBC_SUPPORT)
case TAB_JDBC: tdp= new(g)JDBCDEF; break;
#endif // JDBC_SUPPORT
#if defined(__WIN__) #if defined(__WIN__)
case TAB_MAC: tdp= new(g) MACDEF; break; case TAB_MAC: tdp= new(g) MACDEF; break;
case TAB_WMI: tdp= new(g) WMIDEF; break; case TAB_WMI: tdp= new(g) WMIDEF; break;
......
...@@ -1458,7 +1458,7 @@ int ODBConn::ExecDirectSQL(char *sql, ODBCCOL *tocols) ...@@ -1458,7 +1458,7 @@ int ODBConn::ExecDirectSQL(char *sql, ODBCCOL *tocols)
n++; n++;
// n can be 0 for query such as Select count(*) from table // n can be 0 for query such as Select count(*) from table
if (n && n != (UWORD)ncol) if (n && n > (UWORD)ncol)
ThrowDBX(MSG(COL_NUM_MISM)); ThrowDBX(MSG(COL_NUM_MISM));
// Now bind the column buffers // Now bind the column buffers
......
...@@ -77,7 +77,8 @@ enum TABTYPE {TAB_UNDEF = 0, /* Table of undefined type */ ...@@ -77,7 +77,8 @@ enum TABTYPE {TAB_UNDEF = 0, /* Table of undefined type */
TAB_JSON = 23, /* JSON tables */ TAB_JSON = 23, /* JSON tables */
TAB_JCT = 24, /* Junction tables NIY */ TAB_JCT = 24, /* Junction tables NIY */
TAB_DMY = 25, /* DMY Dummy tables NIY */ TAB_DMY = 25, /* DMY Dummy tables NIY */
TAB_NIY = 26}; /* Table not implemented yet */ TAB_JDBC = 26, /* Table accessed via JDBC */
TAB_NIY = 27}; /* Table not implemented yet */
enum AMT {TYPE_AM_ERROR = 0, /* Type not defined */ enum AMT {TYPE_AM_ERROR = 0, /* Type not defined */
TYPE_AM_ROWID = 1, /* ROWID type (special column) */ TYPE_AM_ROWID = 1, /* ROWID type (special column) */
...@@ -109,6 +110,8 @@ enum AMT {TYPE_AM_ERROR = 0, /* Type not defined */ ...@@ -109,6 +110,8 @@ enum AMT {TYPE_AM_ERROR = 0, /* Type not defined */
TYPE_AM_DIR = 90, /* DIR access method type no */ TYPE_AM_DIR = 90, /* DIR access method type no */
TYPE_AM_ODBC = 100, /* ODBC access method type no */ TYPE_AM_ODBC = 100, /* ODBC access method type no */
TYPE_AM_XDBC = 101, /* XDBC access method type no */ TYPE_AM_XDBC = 101, /* XDBC access method type no */
TYPE_AM_JDBC = 102, /* JDBC access method type no */
TYPE_AM_XJDC = 103, /* XJDC access method type no */
TYPE_AM_OEM = 110, /* OEM access method type no */ TYPE_AM_OEM = 110, /* OEM access method type no */
TYPE_AM_TBL = 115, /* TBL access method type no */ TYPE_AM_TBL = 115, /* TBL access method type no */
TYPE_AM_PIVOT = 120, /* PIVOT access method type no */ TYPE_AM_PIVOT = 120, /* PIVOT access method type no */
...@@ -146,8 +149,9 @@ enum RECFM {RECFM_NAF = -2, /* Not a file */ ...@@ -146,8 +149,9 @@ enum RECFM {RECFM_NAF = -2, /* Not a file */
RECFM_BIN = 2, /* Binary DOS files (also fixed) */ RECFM_BIN = 2, /* Binary DOS files (also fixed) */
RECFM_VCT = 3, /* VCT formatted files */ RECFM_VCT = 3, /* VCT formatted files */
RECFM_ODBC = 4, /* Table accessed via ODBC */ RECFM_ODBC = 4, /* Table accessed via ODBC */
RECFM_PLG = 5, /* Table accessed via PLGconn */ RECFM_JDBC = 5, /* Table accessed via JDBC */
RECFM_DBF = 6}; /* DBase formatted file */ RECFM_PLG = 6, /* Table accessed via PLGconn */
RECFM_DBF = 7}; /* DBase formatted file */
enum MISC {DB_TABNO = 1, /* DB routines in Utility Table */ enum MISC {DB_TABNO = 1, /* DB routines in Utility Table */
MAX_MULT_KEY = 10, /* Max multiple key number */ MAX_MULT_KEY = 10, /* Max multiple key number */
......
...@@ -97,8 +97,8 @@ ODBCDEF::ODBCDEF(void) ...@@ -97,8 +97,8 @@ ODBCDEF::ODBCDEF(void)
{ {
Connect = Tabname = Tabschema = Username = Password = NULL; Connect = Tabname = Tabschema = Username = Password = NULL;
Tabcat = Srcdef = Qchar = Qrystr = Sep = NULL; Tabcat = Srcdef = Qchar = Qrystr = Sep = NULL;
Catver = Options = Cto = Qto = Quoted = Maxerr = Maxres = 0; Catver = Options = Cto = Qto = Quoted = Maxerr = Maxres = Memory = 0;
Scrollable = Memory = Xsrc = UseCnc = false; Scrollable = Xsrc = UseCnc = false;
} // end of ODBCDEF constructor } // end of ODBCDEF constructor
/***********************************************************************/ /***********************************************************************/
...@@ -1009,7 +1009,7 @@ bool TDBODBC::SetRecpos(PGLOBAL g, int recpos) ...@@ -1009,7 +1009,7 @@ bool TDBODBC::SetRecpos(PGLOBAL g, int recpos)
} // end of SetRecpos } // end of SetRecpos
/***********************************************************************/ /***********************************************************************/
/* Data Base indexed read routine for MYSQL access method. */ /* Data Base indexed read routine for ODBC access method. */
/***********************************************************************/ /***********************************************************************/
bool TDBODBC::ReadKey(PGLOBAL g, OPVAL op, const key_range *kr) bool TDBODBC::ReadKey(PGLOBAL g, OPVAL op, const key_range *kr)
{ {
...@@ -1028,7 +1028,7 @@ bool TDBODBC::ReadKey(PGLOBAL g, OPVAL op, const key_range *kr) ...@@ -1028,7 +1028,7 @@ bool TDBODBC::ReadKey(PGLOBAL g, OPVAL op, const key_range *kr)
return false; return false;
} else { } else {
if (To_Def->GetHandler()->MakeKeyWhere(g, Query, op, c, kr)) if (hc->MakeKeyWhere(g, Query, op, c, kr))
return true; return true;
if (To_CondFil) { if (To_CondFil) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment