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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Top Solution Authors