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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! 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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.