Cannot determine a specific error code using OleDbConnection with Client Access Express



using VS.Net2003 and code is in Visual Basic. i am having trouoble getting
specific sql error values/descriptions. i am using a
System.Data.OleDb.OleDbConnection object which accesses an iSeries / As-400
database via IBM Client Acces Express connection. the value for Provider =
IBMDA400.DataSource.1. and the value for Transport Product = Client
Access.

i use a System.Data.OleDb.OleDbCommand object to ".ExecuteNonQuery" to
INSERT or UPDATE tables on the iSeries. Works fine. But, if i create an
error condition, such as attempting to INSERT a duplicate value or perhaps
some invalid syntax in the SQL, the only error code returned is -2147467259
.... which is a generic return code. i am uncertain as to if this is
something i am doing wrong, or if it is a known issue with Client Access
Express or maybe something else. anybody?

example of Try-Catch -Finally code:

Try

cmdBIMS.CommandText = sSQL

nRowsAffected = cmdBIMS.ExecuteNonQuery()

Catch ex As OleDb.OleDbException

' BOTH the following return the value -2147467259

s = ex.Errors.Item(0).SQLState

s &= "Code: " & ex.ErrorCode

s &= " Source: " & ex.Source

DisplayAppMessage("WriteVendorLotTxnToBIMS", s)

Catch ex As Exception

s = "Error: " & ex.Message

DisplayAppMessage("WriteVendorLotTxnToBIMS", s)

Finally

' anything??

End Try


.



Relevant Pages

  • Cannot get a specific error code from OleDbConnection when using Client Access Express
    ... specific sql error values/descriptions. ... database via IBM Client Acces Expressconnection. ... INSERT or UPDATE tables on the iSeries. ... or if it is a known issue with Client Access ...
    (comp.sys.ibm.as400.misc)
  • Re: Telnet-SSL Questions
    ... Communications (PCOMM), which I've successully setup between one PC & ... my iSeries using 'telnet-ssl'. ... VPN could be tricky as eventually when I can get a dozen Client PC's ...
    (comp.sys.ibm.as400.misc)
  • Re: I need some arguments to sell Iseries instead of windows to serve Lotus Domino
    ... A windows server spends at least 30 percent of resources scanning what it serves Antivirus software is mandatory in windows ... and why to run Domino on AS400: ... While the iSeries is pretty invulnerable to viruses, the Domino implementation is just another mail server, and the client will open mails and attachments on Windows boxes. ...
    (comp.sys.ibm.as400.misc)
  • Re: Run PC command without Client Access?
    ... If you're open to a commercial option we have a product called the iSeries ... Office Integrator that can be used to launch remote programs from the ... This should work with NLynx or any other TN5250 client such as CA/400. ...
    (comp.sys.ibm.as400.misc)
  • An error occurred while validating the user login. SQL Error Msg:DBPROCESS is de
    ... A client application accessing sql200 is getting this ... error:An error occurred while validating the user login. ... SQL Error Msg:DBPROCESS is dead or not enabled ...
    (microsoft.public.sqlserver.clients)