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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors