Author |
Message
|
madi |
Posted: Tue Mar 07, 2006 8:30 am Post subject: database insert |
|
|
 Chevalier
Joined: 17 Jan 2006 Posts: 475
|
Hi All
I am trying to insert into a databse using the following code
Code: |
INSERT INTO Database.RTCQACDTA.RTINTS(ITEM_NUMBER,QTY) VALUES
(CAST(FIELDVALUE(InputRoot.XML.test.item) AS CHARACTER),
CAST(FIELDVALUE(InputRoot.XML.test.qty) AS INTEGER)); |
I get the following error
Code: |
Database error: SQL State '55019'; Native Error Code '-7008'; Error Text '[IBM][CLI Driver][AS] SQL7008N REXX variable "RTINTS " contains inconsistent data. SQLSTATE=55019 '.
The error has the following diagnostic information: SQL State '55019' SQL Native Error Code '-7008' SQL Error Text '[IBM][CLI Driver][AS] SQL7008N REXX variable "RTINTS " contains inconsistent data. SQLSTATE=55019 '
|
Does this mean the fields in the database are of different type than those im trying to insert?
The fields in the database are
ITEM_NUMBER = 12 CHARACTER
QTY = 7 NUMERIC 0 DECIMALS.
everything works when i am getting data from the database
plz help |
|
Back to top |
|
 |
mgk |
Posted: Tue Mar 07, 2006 8:44 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
What DB and DB version is this? _________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
madi |
Posted: Tue Mar 07, 2006 9:31 am Post subject: |
|
|
 Chevalier
Joined: 17 Jan 2006 Posts: 475
|
Database vendor type: DB2 Universal Database for iSeries, V5R1
JDBC driver: AS/400 Toolbox for Java JDBC driver |
|
Back to top |
|
 |
Ian |
Posted: Tue Mar 07, 2006 9:48 am Post subject: |
|
|
Disciple
Joined: 22 Nov 2002 Posts: 152 Location: London, UK
|
|
Back to top |
|
 |
madi |
Posted: Tue Mar 07, 2006 10:02 am Post subject: |
|
|
 Chevalier
Joined: 17 Jan 2006 Posts: 475
|
I can read data from the database doesnt that mean all the connections are right?
I changed the user name - password just in case the permissions were a problem.
But I still cannot write to it and get the same error. |
|
Back to top |
|
 |
Ian |
Posted: Wed Mar 08, 2006 3:43 am Post subject: |
|
|
Disciple
Joined: 22 Nov 2002 Posts: 152 Location: London, UK
|
|
Back to top |
|
 |
madi |
Posted: Wed Mar 08, 2006 2:32 pm Post subject: |
|
|
 Chevalier
Joined: 17 Jan 2006 Posts: 475
|
Quote: |
Problem
When running an LSXLC agent that is updating a DB2 table on an iSeries server, you receive the following error:
"SQL7008N REXX variable <tablename> contains inconsistent data SQLSTATE = 55019"
Solution
The error occurs because you are attempting to update a non-journaled DB2 table on the iSeries. To avoid the issue, make sure to set the nojournal property of the LCConnection class to TRUE as shown below:
Option Public
Uselsx "*lsxlc"
Sub Initialize
Dim connect As New LCConnection ("db2")
set your logon info here:
connect.database = "iseriesname"
connect.Userid = "userid"
connect.Password = "password"
connect.Metadata = "tablename "
connect.nojournal = True
|
Is there a command in broker to set connection parameters?
plz help
madi |
|
Back to top |
|
 |
wschutz |
Posted: Wed Mar 08, 2006 6:36 pm Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
do you have a DBA for your os/400 system? that would be the right person to fix this problem.... _________________ -wayne |
|
Back to top |
|
 |
|