× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I have the following code in some modules of an  .asp and HTML
application.   The .asp code is on my web server on a blade server on my
iSeries.  

When the .asp application is accessed it takes information from the
user, checks it against DB2/400 and iSeries flat-files and updates
either or both file types depending on which part of the application is
being run.   The code below is what I have gleaned mainly from the IBM
book: "A Fast Path to AS/400 Client/Server using AS/400 OLE DB Support".
 

The rest of my .asp code works except when I have errors in the data in
one of my tables(like a duplicate key condition) or an EOF condition in
an iSeries flat file.  I'm trying to capture these and other error codes
that return as part of an SQL statement, an .Execute command or like
operations against table and files.  Either the messages are flashing on
the screen and are going by too fast to see or they're not displaying at
all.  

Obviously after I see the format of the return codes and understand
what is returned and when, I plan to trap for those errors and provide a
gentler method of handing the errors than the MS error page that results
on a web browser.

If ObjConn.Errors.Count > 0 Then
  For i = 0 to ObjConn.Errors.count -1
  MSGText = ""
  MsgText = MsgText + "Native error=" +
string(ObjConn.errors.Item(i).NativeError)            
  MsgText = MsgText + "SQL State="   +
string(ObjConn.errors.Item(i).SQLState) 
  MsgText = MsgText + "Number=" + string(ObjConn.Errors.Item(i).Number)
 
  MsgText = MsgText + "Description=" +
string(ObjConn.Errors.Item(i).Description) 
  MsgText = MsgText + "Source=" + string(ObjConn.Errors.Item(i).Source)
 
' + & vbCrLf
  Next
 MsgBox  MsgText "AS/400 OLE DB Support Provider Report Errors"
  Response.Redirect "ErrorSP001.asp"
else
'Execute the command on the AS/400 
  Set AS400File_rs = AS400Command.Execute

Thanks in advance for your help,

Dave Odom

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.