ESQL and Internal Date Conver Weird Prob.
Posted in 1998
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
Having a strange problem show up when trying to access the a column with the type DATE. Any help is appreciated, I am probably overlooking something but just don't see it. I'm accessing it via the sqlda struct: for(colptr=daEcell->sqlvar, i=0; (i < MAXCOLS && (i < daEcell->sqld)); i++,colptr++) { strcpy(cname,colptr->sqlname); rupshift(cname); if (strcmp("DATE_VAL",cname) == 0) { SIGSEGV ---> rdatestr((long)colptr->sqldata,ptrEcell->omc); pos += 10; } else if(strcmp("TIME_VAL",cname) == 0) { intoasc((intrvl_t *) colptr->sqldata,&ptrEcell->omc[pos]); pos += 5; } I get the correct time so the intoasc is working correctly and the values are lined up. (gdb) print *colptr $1 = {sqltype = 7, sqllen = 4, sqldata = 0xcce58 "", sqlind = 0x0, sqlname = 0xce470 "date_val", sqlformat = 0x0, sqlitype = 0, sqlilen = 0, sqlidata = 0x0} Trace at point of rdatestr #0 0xede4b5ac in _malloc_unlocked () #1 0xede4b370 in malloc () #2 0x56b38 in initxby () #3 0x56a34 in _initmdarray () #4 0x56720 in rfmtdate () #5 0x560e0 in rdatestr ()