Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
eferniza
New Member

DataSource.Error: Microsoft Db2 Client: HISMPCB0002 In BasePrimitiveConverter

Getting the following error when trying to retrieve a table from a AS400/Mapics server.

 

DataSource.Error: Microsoft Db2 Client: HISMPCB0002 In BasePrimitiveConverter the SetCodePage method has been called with a invalid codepage: 65535. SQLSTATE=HY000 SQLCODE=-343

Anybody knows the source of the error, or workaround to pull this information directly from the server.

1 REPLY 1
lbendlin
Super User
Super User

The code page is missing - set to -1 which is equivalent to 65535.

 

Specify 65001 for utf-8,  or maybe 1252 for such an old machine

 

Code Page Identifiers - Win32 apps | Microsoft Learn

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.