Why am I getting an SQLCODE == -425, ISAM error == -107?
I haven't found anything in the online do***entation about making an
implicit connection when renaming a database.
onstat -u doesn't reveal any other connection different from anydb.
$ uname -a
SunOS since 5.10 Generic_127127-11 sun4u sparc SUNW,Sun-Fire-V440
$ esql -V
IBM Informix CSDK Version 3.00, IBM Informix-ESQL Version 3.00.UC2
Software Serial Number AAA#B000000
$ onparams -V
IBM Informix Dynamic Server Version 11.10.UC1 Software Serial
Number AAA#B000000
$ cat rename_and_connect.ec
#include <stdio.h>
#define psqlcode(msg) do \
{ \
printf("%d: %s %d\n", __LINE__, msg, SQLCODE);
fflush(stdout); \
} while(0)
int main(void)
{
EXEC SQL connect to 'anydb'; psqlcode("connected to anydb?");
EXEC SQL execute immediate 'rename database test to test2';
psqlcode("test renamed to test2?");
printf("connname == %s\n", ifx_getcur_conn_name());
EXEC SQL connect to 'test2'; psqlcode("connected to test2?");
printf("connname == %s\n", ifx_getcur_conn_name());
}
$ esql rename_and_connect.ec -o x && ./x
11: connected to anydb? 0
12: test renamed to test2? 0
connname == anydb
15: connected to test2? -425
connname == anydb


|