Troubleshooting
Problem
The Adapter for JDBC can use the JDBC driver released by Microsoft to work with SQL Server 2000. When the adapter needs to update a record in a table within SQL Server 2000, it will call the JDBC API java.sql.PreparedStatement.executeUpdate(). According to the JDBC specification, this method should return the affected row count for the UPDATE statement. In this scenario, the adapter updates just one record, and the returned value should be 1. But we don't find this expected behavior if a trigger has been set up in this table and this trigger includes the DDL call, CREATE TABLE. In this case, the returned value is always 0, not 1. Note that the Create table is for creating a temporary table within the trigger. If we remove this create table call, then the JDBC API call returns 1 properly.
Cause
Confirmed by Microsoft support engineer that this is a defect in the JDBC driver of SQL Server 2000.
Resolving The Problem
This defect has been fixed in the JDBC driver of SQL Server 2005, and the suggestion from Microsoft support is to use this new JDBC driver. You will need to modify the DatabaseURL and JDBCDriverClass settings as below:
DatabaseURL =jdbc:sqlserver://IP:Port;DatabaseName=UserDatabaseName
JDBCDriverClass= com.microsoft.sqlserver.jdbc.SQLServerDriver
Was this topic helpful?
Document Information
Modified date:
15 June 2018
UID
swg21232426