diff --git a/storage/connect/json.cpp b/storage/connect/json.cpp index d461b60470d..c4d2c006da1 100644 --- a/storage/connect/json.cpp +++ b/storage/connect/json.cpp @@ -1587,7 +1587,17 @@ void JVALUE::SetValue(PGLOBAL g, PVAL valp) Val->Type = TYPE_NULL; } else switch (valp->GetType()) { case TYPE_STRING: - case TYPE_DATE: + if (((DTVAL*)valp)->IsFormatted()) + Val->Strp = valp->GetCharValue(); + else { + char buf[32]; + + Val->Strp = PlugDup(g, valp->GetCharString(buf)); + } // endif Formatted + + Val->Type = TYPE_DTM; + break; + case TYPE_DATE: Val->Strp = valp->GetCharValue(); Val->Type = TYPE_STRG; break; diff --git a/storage/connect/plgdbsem.h b/storage/connect/plgdbsem.h index a40e32bcfb2..1d644cb75c2 100644 --- a/storage/connect/plgdbsem.h +++ b/storage/connect/plgdbsem.h @@ -160,7 +160,7 @@ enum RECFM {RECFM_DFLT = 0, /* Default table type */ RECFM_FMT = 8, /* FMT formatted file */ RECFM_VCT = 9, /* VCT formatted files */ RECFM_XML = 10, /* XML formatted files */ - RECFM_JASON = 11, /* JASON formatted files */ + RECFM_JSON = 11, /* JSON formatted files */ RECFM_DIR = 12, /* DIR table */ RECFM_ODBC = 13, /* Table accessed via ODBC */ RECFM_JDBC = 14, /* Table accessed via JDBC */ diff --git a/storage/connect/value.h b/storage/connect/value.h index 3b907c2bf41..df6a55501b6 100644 --- a/storage/connect/value.h +++ b/storage/connect/value.h @@ -418,7 +418,8 @@ class DllExport DTVAL : public TYPVAL { virtual bool SetValue_char(const char *p, int n); virtual void SetValue_psz(PCSZ s); virtual void SetValue_pvblk(PVBLK blk, int n); - virtual char *GetCharString(char *p); + virtual PSZ GetCharValue(void) { return Sdate; } + virtual char *GetCharString(char *p); virtual int ShowValue(char *buf, int len); virtual bool FormatValue(PVAL vp, PCSZ fmt); bool SetFormat(PGLOBAL g, PCSZ fmt, int len, int year = 0);