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
tahir9
Frequent Visitor

Microsoft Sql converting data type varchar(10) '___' to int only in powerbi?

Failed to save modifications to the server. Error returned: 'OLE DB or ODBC error: [DataSource.Error] Microsoft SQL: Conversion failed when converting the varchar value '_____' to data type int..
'.

 

Hello i am getting this error but my query runs fine in SQL Management Studio not sure what column is causing this issue either since power bi isn't specifying... anyone had ideas to alleviate issue? 

1 ACCEPTED SOLUTION
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @tahir9,

 

Did you try to change the data type in the Query Editor? Are they some underlines? Microsoft Sql converting data type varchar(10) '___' to int only in powerbi.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Best Regards,

Dale

 

 

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

View solution in original post

4 REPLIES 4
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @tahir9,

 

Did you try to change the data type in the Query Editor? Are they some underlines? Microsoft Sql converting data type varchar(10) '___' to int only in powerbi.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Best Regards,

Dale

 

 

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

Ah yes I did thank you!
mehaboob557
Resolver III
Resolver III

Hi @tahir9,

 

Go in edit queries. then clicl on source and update this in that [ReturnSingleDatabase=true, OldGuids=true, CommandTimeout=#duration(0, 1, 0, 0)])

 

may be some data will be not in a correct format. so this error may occur.

 

add with OldGuids=true in your source and your error will go.

 

Hope this may help you

 

Regards,

Mehbub

Hello thanks for the reply but i am not sure what you mean... or where i can update that i am not seeing that when i go to edit queries and sources... ? 

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!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

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.