Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.
We are experiencing an issue with tables created on the iSeries using sql and a pc connection(ODBC).
The table gets created but the programmer gets an error msg sql7008 when trying to update(insert) the table.
If the table is recreated using DDS instead of sql - the problem goes away. This seems to only occur
when the table contains integer fields. If all the fields are char, no problem. Thanks. (V7R1)
Looks like Commitment Control may be the issue or perhaps NULL-capable defaults on ODBC vs DB2/400.
Check out this link: http://www.querytool.com/help/876.htm
Thank you Bob - I added a little more detail regarding the sql problem. I copied and pasted the verbiage below from an
email I got from the programmer involved. Thanks.
I can create views based on any existing table
and I can create new tables with no issue
unless they contain numeric fields.
Executing this from an ODBC link works fine:
CREATE TABLE HEFILE.XOX
(VNAME VARCHAR(40),
HERMVEND VARCHAR(10),
XOVEND VARCHAR(10));
However, if you I change the data type
of a column to INTEGER it fails.
CREATE TABLE HEFILE.XOX
(VNAME VARCHAR(40),
HERMVEND INTEGER,
XOVEND INTEGER);
CREATE TABLE HEFILE.XOX (VNAME VARCHAR(40), HERMVEND INTEGER NOT NULL DEFAULT 0, XOVEND INTEGER NOT NULL DEFAULT 0 )