Subject | Write table from R into Firebird server error |
---|---|
Author | Huidong TIAN |
Post date | 2013-06-05T08:49:55Z |
Hi,
I need to write some data.frame from R into Firebird server. Connect,
Query and dbReadTable worked well. However, when try to write data into
database, I encountered the following error:
*
*
*> Tab <- dbGetQuery(conn, "select first 1000 * from GROUP_REGISTRATIONS")*
*> head(Tab)*
* *ID DATE_CHECKED YEAR_OF_DIAGNOSIS CODING_GROUP
MALIGN_REGISTERED
1 1 2007-02-04 2007 13 - URO/Hud
7
2 2 2007-02-11 2007 13 - URO/Hud
50
3 3 2007-02-18 2007 13 - URO/Hud
71
4 4 2007-02-25 2007 13 - URO/Hud
77
5 5 2007-03-04 2007 11 - LuNCH/Sarkom/Non-solid
1
6 6 2007-03-04 2007 12 - GyM *
11*
*> dbWriteTable(conn, "Tab_0", Tab)*
Error in .verify.JDBC.result(s, "Unable to execute JDBC statement ",
statement) :
Unable to execute JDBC statement INSERT INTO Tab_0 VALUES(?,?,?,?,?) (GDS
Exception. 335544569. Dynamic SQL Error
SQL error code = -204
Table unknown
TAB_0
At line 1, column 13)
*> dbReadTable(conn, 'Tab_0')*
[1] ID DATE_CHECKED YEAR_OF_DIAGNOSIS CODING_GROUP
MALIGN_REGISTERED
<0 rows> (or 0-length row.names)
An friend suggest that could because the new table has not been 'commit',
so in the Error message appeared 'Table unknow'.
I checked the help document for dbWriteTable (it's a R function), and it
says "any optional arguments that the underlying database driver supports"
can be passed into dbWriteTable. So, what kind of argument I should give?
like "autocommit"?
Best Regards!
--
Huidong Tian
Cancer Registry of Norway.
Phone: +47 40624112
Email: tienhuitung@...
[Non-text portions of this message have been removed]
I need to write some data.frame from R into Firebird server. Connect,
Query and dbReadTable worked well. However, when try to write data into
database, I encountered the following error:
*
*
*> Tab <- dbGetQuery(conn, "select first 1000 * from GROUP_REGISTRATIONS")*
*> head(Tab)*
* *ID DATE_CHECKED YEAR_OF_DIAGNOSIS CODING_GROUP
MALIGN_REGISTERED
1 1 2007-02-04 2007 13 - URO/Hud
7
2 2 2007-02-11 2007 13 - URO/Hud
50
3 3 2007-02-18 2007 13 - URO/Hud
71
4 4 2007-02-25 2007 13 - URO/Hud
77
5 5 2007-03-04 2007 11 - LuNCH/Sarkom/Non-solid
1
6 6 2007-03-04 2007 12 - GyM *
11*
*> dbWriteTable(conn, "Tab_0", Tab)*
Error in .verify.JDBC.result(s, "Unable to execute JDBC statement ",
statement) :
Unable to execute JDBC statement INSERT INTO Tab_0 VALUES(?,?,?,?,?) (GDS
Exception. 335544569. Dynamic SQL Error
SQL error code = -204
Table unknown
TAB_0
At line 1, column 13)
*> dbReadTable(conn, 'Tab_0')*
[1] ID DATE_CHECKED YEAR_OF_DIAGNOSIS CODING_GROUP
MALIGN_REGISTERED
<0 rows> (or 0-length row.names)
An friend suggest that could because the new table has not been 'commit',
so in the Error message appeared 'Table unknow'.
I checked the help document for dbWriteTable (it's a R function), and it
says "any optional arguments that the underlying database driver supports"
can be passed into dbWriteTable. So, what kind of argument I should give?
like "autocommit"?
Best Regards!
--
Huidong Tian
Cancer Registry of Norway.
Phone: +47 40624112
Email: tienhuitung@...
[Non-text portions of this message have been removed]