Re: ESQL/C-SQL-DATE FORMAT PROBLEMS
Posted in 1996
Mario, I don't know for certain whether my diagnosis applies to your situation, but it has cropped up sufficiently often in internal discussions for something of this sort to be plausible in your situation. I suspect you are using at least one ESQL/C function inside the custom Perform, and that the ESQL/C source file was compiled by the 7.10 ESQL/C compiler -- indirectly for you almost certainly said something along the lines of: cperf -o nperform file.ec Unfortunately, the cperf script assumes that the ESQL/C installed is compatible with the ISQL which is installed. In days (long) past, this was normally the case. Nowadays, with the 7.1x and later servers, it is routinely not the case. This can lead to problems -- usually at link time, but sometimes only at runtime. I'd counsel you to recompile the code as follows: c4gl -c file.ec cperf -o nperform file.o This will use the correct ESQL/C compiler because I4GL includes its own copy of the correct ESQL/C compiler for the I4GL/ISQL products (provided they have the same version; it needn't be exact, but 4.1x I4GL and 6.0x ISQL is a non-starter). If you don't have I4GL, you either need to get it or get and install the correct 6.0x (x normally equal to 0) version of ESQL/C, possibly installed in some other INFORMIXDIR than your normal one. Mixing 7.1x ESQL/C code with 6.0x ISQL is error prone. Mixing 5.0x ESQL/C with 4.1x ISQL usually won't link at all. Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h> }From: Legal Service Company <lesco@guate.net> }Date: Fri, 6 Sep 1996 13:54:25 -0600 }X-Informix-List-Id: <list.11273> } }Ref. SPERFORM vs. CPERF (Date format not binding correctly) } }From: Mario Estrada / LESCO, S.A., Guatemala City, Central America } lesco@guate.net / (502) 3318116 Fax (502) 3348447 } }Hi guys! } }I have opened the case # 444411 with the informix-tech support >department, but }i still don't have an answer for the following problem, I've read about >a bug from the ESQL/C 7.10 when binding a date format, Does anybody can >help me out with this problem ? } }Product(s) and Version : } ESQL/C 7.11 UC2 DEVELOPMENT } ONLINE DS 7.12 UC2 DEVELOPMENT } I-SQL 6.03 UC1 DEVELOPMENT } I-4GL 6.03 UD1 DEVELOPMENT } ESQL/C RUNTIME 7.11 UC2 } I-4GL 6.03 UC2 RUNTIME } I-SQL 6.03 UC1 RUNTIME } ONLINE DSA 7.12 UC3 RUNTIME } }Hardware:SPARC MODELS (CLASS G) }Operating System and Version SOLARIS 2.5 } }Having the following table: } batch ( filename char(64, loaddate date, loadtime char(8), } btype smallint, re serial not null constraint "informix".N109_4) } }REVOKE ALL ON "INFORMIX".BATCH FROM "PUBLIC"; }CREATE INDEX "INFORMIX".IX200_4 ON "INFORMIX".BATCH(BTYPE); }CREATE UNIQUE "INFORMIX".BMCLOG_REC ON "INFORMIX".BATCH(REC); } }We created the following form : } }DATABASE TIS }SCREEN SIZE 24 BY 80 }{ }FILE NAME [F000 ] } [F001 ] }LOADDATE [F002 ] }LOADTIME [F003 ] }BTYPE [F004 ] }REC [F005 ] }} }END }TABLES }BATCH = "INFORMIX".BATCH }ATTRIBUTES }F000 = BATCH.FILENAME[1,32]; }F001 = BATCH.FILENAME[1,32]; }F002 = BATCH.LOADDATE; }F003 = BATCH.LOADTIME; }F004 = BATCH.BTYPE; }F005 = BATCH.REC; }END } }THE PROBLEMS ENCOUNTERED SO FAR ARE AS FOLLOWS: } }1. IF WE MAKE AN ENTRY INTO THE DATABASE USING } A REGULAR 'SPERFORM' SCREEN, ANY DATE ENTERED } IS DISPLAYED DIFFERENTLY WHEN THE SAME RECORD } IS QUERIED USING THE SAME FORM RUN WITH A } 'CPERF' PROGRAM. THIS PROBLEM OCCURS IN BOTH } DIRECTIONS. } EG. "02/09/1996" WAS ENTERED IN A DATE FIELD } USING A FORM RUN BY A 'CPERF' PROGRAM. } THIS DATE WAS DISPLAYED AS "02/03/1996" } WHEN QUERIED USING THE SAME SCREEN RUN } WITH 'SPERFORM'. } } "03/09/1996" WAS ENTERED IN A DATE FIELD } USING A SCREEN RUN WITH 'SPERFORM'. } THIS DATE WAS DISPLAYED AS "65/13/1996" } WHEN QUERIED USING THE SAME SCREEN RUN } WITH 'CPERF'. } } (NOTE: WE USE THE "DDMMYYYY" AND THE DBDATE } ENVIRONMENT VARIABLE IS SET TO DMY4/ } } WE KNOW THE PROBLEM IS NO WITH THE FORM FILE } SINCE WE USED THE SAME FORM FILE FOR ENTERING } AND VIEWING THE RECORD. THE ONLY THING THAT } CHANGED WAS THE METHOD OR RUNNING IT: } 'SPERFORM' VS. A 'CPERF' PROGRAM.