Add Records to an Iseries (AS/400) Server

B

Brian Piotrowski

Hi All,

I've gotten to the point where I can read records from our AS/400, but when
I write, it goes through the motions but does not write anything.

Here's my code to write to the AS/400:
Set rsADDPM = Server.CreateObject("ADODB.Recordset")
PNPLCD = request.querystring("pcode")
PNOPTNO = request.form("PNOPTNO")
PNOPTCL = request.form("PNOPTCL")
PNNPTNO = request.form("PNNPTNO")
PNNPTCL = request.form("PNNPTCL")
SQLaddpm = "insert into SPSL.VARPM_PF
(PNPLCD,PNOPTNO,PNOPTCL,PNNPTNO,PNNPTCL) values ('" &PNPLCD& "','" &PNOPTNO&
"','"&PNOPTCL& "','"&PNNPTNO& "','"&PNNPTCL& "')"
rsADDPM.open SQLaddpm, adoCon

Like I said, it goes through the motion and tells me it wrote something, but
when I check through the AS/400 sql intepreter, it doesn't display the
record I just added.

Do I have to commit the records somehow when I'm finished writing them? If
not, what should I add in the code to make it write?

Thanks!

Brian.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top