SQLCODE and SQLSTATE Differences among IBM Relational Database Systems

来源:互联网 发布:拍照软件哪个好 编辑:程序博客网 时间:2024/05/18 10:04
 

Different IBM(R) relational database products do not always produce the same SQLCODE values for similar errors. You can handle this problem in either of two ways:

  • Use the SQLSTATE instead of the SQLCODE for a particular error.

    SQLSTATE values have approximately the same meaning across the database products, and the products produce SQLSTATE values that correspond to the SQLCODE values.

  • Map the SQLCODE values from one system to another system.

    By default, DB2(R) Connect maps SQLCODE values and tokens from each IBM host or iSeries(TM) server system to your DB2 Universal Database system. You can specify your own SQLCODE mapping file if you want to override the default mapping or you are using a database server that does not have SQLCODE mapping (a non-IBM database server). You can also turn off SQLCODE mapping.

Related concepts
  • SQLCODE mapping

This topic can be found in: Application Development Guide: Programming Client Applications.

原创粉丝点击