Rob -

I'm pretty sure I'm connecting to the i, because running the first procedure out of the agent works just fine. All I do is change one letter in the agent so that it calls the second procedure, and I get the error message.

Maybe I'm missing something, but I've been trying to narrow things down, and it looks like:

* I'm connecting to the i just fine (verified when I call the first procedure)

* Both procedures do actually return results (verified by trying them in iNav)

* Something about what they return (which should be exactly the same, as far as I can tell) is different enough to make the agent choke on the second one.

I'm really scratching my head on this one -- it looked so simple!


Lotus Domino on the iSeries / AS400 <domino400@xxxxxxxxxxxx> writes:
Mike,

Good use of iNav. I was going to suggest that first.

Have you done other DB connections?

Are you at least connecting to your i? Do not assume that, since you are
running it on your i, that you do. Some sample code:

If Not conn.connectto(servername, Uname, Pwd) Then
Print db.filepath+" - Connection failed."
txt="Could not connect to system '" & servername &
"' using UserId '" & Uname & "'."
Call PI_Report.AppendText(txt)
Call PI_Report.AddNewLine(1)
txt=txt+" The extended message is '"
+conn.GetExtendedErrorMessage()+"'."
Call agentlog.Logaction(txt)
Print txt
doc.piupdate=4
Call SendMailMsg(txt)
Exit Forall
End If

Print db.filepath+" - Connection completed."

If logmsgs Then Print "Successfully connected to "+
servername

Set query.connection=conn




Rob Berendt


Mike Naughton
Senior Programmer/Analyst
Judd Wire, Inc.
124 Turnpike Road
Turners Falls, MA 01376
413-676-3144
Internal: x 444
mnaughton@xxxxxxxxxxxx
****************************************
NOTICE: This e-mail and any files transmitted with it are confidential and solely for the use of the intended recipient. If you are not the intended recipient or the person responsible for delivering to the intended recipient, be advised that any use is
strictly prohibited. If you have received this e-mail in error, please notify us immediately by replying to it and then delete it from your computer.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.