This is a multi-part message in MIME format.
---------------------------------79565609717987557822023721351
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=iso-8859-1
--
Mike Stenzler 70 Hudson St. 201.798.5784
Mgr. Info. Sys. Hoboken, NJ 201.798.6367 fax
RPCG, Inc. 07030 rpcg@panix.com
All content my opinion only - not RPCG's.
---------------------------------79565609717987557822023721351
Content-Transfer-Encoding: 7bit
Content-Type: text/plain
Anyone have experience with this problem?
Using ESQL/C for windows (V5.01) & Visual C++ 1.00, when
I use rdatestr() it fails.
The same code on my unix system works no problemo.
Here's an abbreviated sample:
void main()
{
$char qry[QUERYSIZE];
$long B_date = 0L;
$char B_id[ID_SIZE];
char date_str[DATE_STR_SIZE];
long ifxdate = 0L;
strcpy(qry, "select id, date1 from dtest");
$prepare qid from $qry;
$declare curs1 cursor for qid;
$open curs1;
/* read data from table */
while(1)
{
$fetch curs1 into $B_id, $B_date;
if(SQLCODE)
break;
rdatestr(B_date, date_str);
printf("ID: %s DATE: %s IFXDATE: %ld\\n",
B_id, date_str, B_date);
}
/* test using local data */
rdefmtdate(&ifxdate, "mm/dd/yy", "4/28/95");
rdatestr(ifxdate, date_str);
printf("***LOCAL DATE: %s LOCALIFXDATE: %ld\\n",
date_str, ifxdate);
exit(0);
}
On the Unix side, this program will give correct results.
Under Windows, rdatestr() will fail, but dates will be
interpeted correctly as a long.
?????
Mike
---------------------------------79565609717987557822023721351--