Subject | GPRE |
---|---|
Author | Euler Jr. |
Post date | 2005-07-22T14:45:18Z |
Hi all,
I'm trying compile this code ( mytest.e ) using gpre. The command line is:
gpre mytest.e -c -either_case -manual -no_lines -user sysdba -password
masterkey
and I receive this message:
(E) mytest.e:11: Inconsistent database specifier
I have two databases named test.fdb and test2.fdb. Wich one has one
table (TEST) with the structure:
CREATE TABLE TEST (ID SMALLINT);
I want populate TEST table (test2.fdb) from TEST (test.fdb) table.
If I remove the line describe EXEC SQL INSERT INTO db2.TEST SELECT *
FROM db1.TEST; gpre generate mytest.c file normally.
// source code
// mytest.e
#include <ibase.h>
#include <stdio.h>
#include <stdlib.h>
int main( int argc, char *argv[] ) {
EXEC SQL SET DATABASE db1 = "test.fdb";
EXEC SQL SET DATABASE db2 = "test2.fdb";
EXEC SQL CONNECT ALL USER 'SYSDBA' PASSWORD 'sig';
EXEC SQL SET TRANSACTION;
//this line generate the error
EXEC SQL INSERT INTO db2.TEST SELECT * FROM db1.TEST;
EXEC SQL COMMIT;
EXEC SQL DISCONNECT ALL;
return( 0 );
}
// end mytest.e
Any suggestion?
Thanks
[]s
Euler Jr.
I'm trying compile this code ( mytest.e ) using gpre. The command line is:
gpre mytest.e -c -either_case -manual -no_lines -user sysdba -password
masterkey
and I receive this message:
(E) mytest.e:11: Inconsistent database specifier
I have two databases named test.fdb and test2.fdb. Wich one has one
table (TEST) with the structure:
CREATE TABLE TEST (ID SMALLINT);
I want populate TEST table (test2.fdb) from TEST (test.fdb) table.
If I remove the line describe EXEC SQL INSERT INTO db2.TEST SELECT *
FROM db1.TEST; gpre generate mytest.c file normally.
// source code
// mytest.e
#include <ibase.h>
#include <stdio.h>
#include <stdlib.h>
int main( int argc, char *argv[] ) {
EXEC SQL SET DATABASE db1 = "test.fdb";
EXEC SQL SET DATABASE db2 = "test2.fdb";
EXEC SQL CONNECT ALL USER 'SYSDBA' PASSWORD 'sig';
EXEC SQL SET TRANSACTION;
//this line generate the error
EXEC SQL INSERT INTO db2.TEST SELECT * FROM db1.TEST;
EXEC SQL COMMIT;
EXEC SQL DISCONNECT ALL;
return( 0 );
}
// end mytest.e
Any suggestion?
Thanks
[]s
Euler Jr.