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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
QIAO
Helper II
Helper II

We cannot convert the value null to type table

I try to use Direct Query mode to load data, but always get "we cannot convert the value null to type table" in the "Create connections" stage.

Found not error in ODBC trace log.

WHY??

 

I can run Import mode smoothly.

 

1 ACCEPTED SOLUTION

Solved, it's because SQLExecute should return SQL_SUCCESS instead of return SQL_NO_DATA when load empty table.

 

View solution in original post

5 REPLIES 5
v-chuncz-msft
Community Support
Community Support

@QIAO,

 

You may check code in The Advanced Editor.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I tested. When i comes to use Query Editor, it runs okay.  But get data through Home->Get data, it would throw error like this.

WeChat Image_20180126113529.png

Solved, it's because SQLExecute should return SQL_SUCCESS instead of return SQL_NO_DATA when load empty table.

 

mvarma
Regular Visitor

We are experiencing the same issue. The table is not empty. Can you please provide a solution on how to resolve this?

As I said, SQLExecute/SQLExecDirectW returned SQL_NO_DATA when loading empty table, it should return SQL_SUCCCESS. That's the way I solved my problem.

Helpful resources

Announcements
Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 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.