DB2 - Problem description
Problem IT21244 | Status: Closed |
DB2BULKCOPY CAUSES THE ERROR CLI0112E AND LOAD INCORRECT VALUES WHEN USING SQLDATAREADER | |
product: | |
DB2 FOR LUW / DB2FORLUW / A50 - DB2 | |
Problem description: | |
For the case SQLDataReader -> DB2BulkCopy, the following is the used code, resulting in CLI0112E at copy.WriteToServer(reader): Imports System Imports System.IO Imports System.Data Imports IBM.Data.DB2 Imports Microsoft.VisualBasic Imports System.Data.SqlClient Public Class Module1 Public Shared Sub Main(args() As String) Try Using sqlconn As SqlConnection = New SqlConnection("Server=MM-PC\SQLEXPRESS;Database=testjg;UserId=je nsi;Password=mypwd;") sqlconn.Open() Using cmd As SqlCommand = sqlconn.CreateCommand() cmd.CommandText = "Select F1, F2, F3 From dbo.t1" Using reader As SqlDataReader = cmd.ExecuteReader() Using cn As New DB2Connection("Database=SAMPLE;UID=db2admin;Pwd=mypwd;Server=127 .0.0.1:50000") cn.Open() Using copy As New DB2BulkCopy(cn) copy.BulkCopyTimeout = 0 copy.DestinationTableName ="db2admin.t2" copy.ColumnMappings.Add(New DB2BulkCopyColumnMapping("F1", "F1")) copy.ColumnMappings.Add(New DB2BulkCopyColumnMapping("F2", "F2")) copy.ColumnMappings.Add(New DB2BulkCopyColumnMapping("F3", "F3")) copy.WriteToServer(reader) copy.Close() Console.WriteLine("success") End Using End Using End Using End Using End Using Catch ex As Exception Dim fehler As String = ex.ToString() Console.WriteLine(fehler) End Try End Sub End Class | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to Db2 10.5 Fix Pack 9 or higher * **************************************************************** | |
Local Fix: | |
Solution | |
First fixed in Db2 10.5 Fix Pack 9 | |
Workaround | |
not known / see Local fix | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 29.06.2017 29.09.2017 29.09.2017 |
Problem solved at the following versions (IBM BugInfos) | |
9.0. | |
Problem solved according to the fixlist(s) of the following version(s) |