Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Informix > connect && rena...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 13961 of 14337
Post > Topic >>

connect && rename && connect

by Gerardo Santana <gerardo.santana@[EMAIL PROTECTED] > May 3, 2008 at 06:33 PM

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
 




 3 Posts in Topic:
connect && rename && connect
Gerardo Santana <gerar  2008-05-03 18:33:11 
Re: connect && rename && connect
"Radhika Gadde"  2008-05-06 12:46:39 
Re: connect && rename && connect
"=?ISO-8859-1?Q?Gera  2008-05-06 14:34:30 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Sun Jul 20 0:35:08 CDT 2008.