Commit af26c366 authored by Olivier Bertrand's avatar Olivier Bertrand

Fix handling of NULL values when reading from tables.

  modified:   storage/connect/tabodbc.cpp
  modified:   storage/connect/value.h
parent 514a7d84
...@@ -1268,6 +1268,10 @@ void ODBCCOL::ReadColumn(PGLOBAL g) ...@@ -1268,6 +1268,10 @@ void ODBCCOL::ReadColumn(PGLOBAL g)
} // endif Buf_Type } // endif Buf_Type
// Handle null values
if (Value->IsZero())
Value->SetNull(Nullable);
if (trace) { if (trace) {
char buf[64]; char buf[64];
...@@ -1393,7 +1397,7 @@ void ODBCCOL::WriteColumn(PGLOBAL g) ...@@ -1393,7 +1397,7 @@ void ODBCCOL::WriteColumn(PGLOBAL g)
/* -------------------------- Class TDBXDBC -------------------------- */ /* -------------------------- Class TDBXDBC -------------------------- */
/***********************************************************************/ /***********************************************************************/
/* Implementation of the TDBODBC class. */ /* Implementation of the TDBXDBC class. */
/***********************************************************************/ /***********************************************************************/
TDBXDBC::TDBXDBC(PODEF tdp) : TDBODBC(tdp) TDBXDBC::TDBXDBC(PODEF tdp) : TDBODBC(tdp)
{ {
......
...@@ -360,14 +360,9 @@ class DllExport DTVAL : public TYPVAL<int> { ...@@ -360,14 +360,9 @@ class DllExport DTVAL : public TYPVAL<int> {
public: public:
// Constructors // Constructors
DTVAL(PGLOBAL g, int n, int p, PSZ fmt); DTVAL(PGLOBAL g, int n, int p, PSZ fmt);
//DTVAL(PGLOBAL g, PSZ s, int n);
//DTVAL(PGLOBAL g, short i);
DTVAL(int n); DTVAL(int n);
//DTVAL(PGLOBAL g, longlong n);
//DTVAL(PGLOBAL g, double f);
// Implementation // Implementation
virtual bool IsZero(void) {return Null;}
virtual bool SetValue_pval(PVAL valp, bool chktype); virtual bool SetValue_pval(PVAL valp, bool chktype);
virtual bool SetValue_char(char *p, int n); virtual bool SetValue_char(char *p, int n);
virtual void SetValue_psz(PSZ s); virtual void SetValue_psz(PSZ s);
......
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