This is a discussion on connect && rename && connect within the Informix forums, part of the Database Server Software category; --> Why am I getting an SQLCODE == -425, ISAM error == -107? I haven't found anything in the online ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Why am I getting an SQLCODE == -425, ISAM error == -107? I haven't found anything in the online documentation 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 |
| |||
| can you try by adding the "EXEC SQL disconnect current" before connecting to test2 Thanks, Radhika. On 5/4/08, Gerardo Santana <gerardo.santana@gmail.com> wrote: > > Why am I getting an SQLCODE == -425, ISAM error == -107? > I haven't found anything in the online documentation 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 > > _______________________________________________ > Informix-list mailing list > Informix-list@iiug.org > http://www.iiug.org/mailman/listinfo/informix-list > |
| ||||
| Thanks Radhika, but that doesn't fix the problem. I don't want to disconnect my current connection and I don't want to switch to a connection to the server (but I will have to!). I will report the bug, as soon as I know how to do it. Thanks Jonathan. On 5/6/08, Radhika Gadde <radhika.gadde1@gmail.com> wrote: > can you try by adding the "EXEC SQL disconnect current" before connecting to > test2 > > Thanks, > Radhika. > > > On 5/4/08, Gerardo Santana <gerardo.santana@gmail.com> wrote: > > > > Why am I getting an SQLCODE == -425, ISAM error == -107? > > I haven't found anything in the online documentation 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 > > > > _______________________________________________ > > Informix-list mailing list > > Informix-list@iiug.org > > http://www.iiug.org/mailman/listinfo/informix-list > > > -- Gerardo Santana |