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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss 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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.