> I'm having troubles inserting records into our AS400.  I've tried just
about
> every combination I can think of when trying to insert a record, but
nothing
> is working.  Here is the most recent error I keep getting:
>
> Warning: SQL error: [IBM][CLI Driver][AS] SQL7008N REXX variable "WBO230P
"
> contains inconsistent data. SQLSTATE=55019 , SQL state 55019 in SQLExecute
>
> And here is the SQL command:
> INSERT INTO WEBTEST.wbo230p (WOSTS, WOORD, WOCUS, WOST, WSNAM, WSAD1,
WSAD2,
> WSADX, WSAD3, WSSTA, WSZIP, WOPO, WODTTM, WONORD, WINVDT, WPHONE, WEMAIL,
> WSBSTA, WSAMT) VALUES ('1',0000000001,000001,0001,'t ','t ','t ','t ','t
> ','t ','t ','t ',00000000000001,'t ','t ','t ','t ','t ','t ')

Like, unless AS400/IBM/CLI/AS SQL is way different from SQL92, you either
don't need WEBTEST, or there should be no .wbo230p, or you aren't telling us
that you are doing something funky like trying to insert into one database
(WEBTEST) even though you are connected to another...

But, even so, WEBTEST.wbo230p maybe be fine, and it's just one of those
columns whose data it doesn't like.

The question, of course, is which one.

The leading 0's on WOORD and WOCUS and [mumble] look pretty darned
suspicious to me.  If those are integer, they should just be 1, not 000001.
If they are *not* integer, you need apostrophes on them just like the
others.

If that doesn't help, just start throwing out columns.  Or throw them all
out and build it up 1 column at a time) until you find out which one it
doesn't like.

I dunno why SQL engines are so darned non-specific in their error messages.
My favorite:
syntax error near ','
Thanks guys!  Like what non-trivial SQL statement *doesn't* have a bazillion
commas in it?!

PS  Am I to assume you actually have a working PHP<->AS400 connection?  If
you could build a PHP/AS400 page, you would probably get much traffic.
People keep asking about AS400, and I've never even seen one.

--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to