Forum Discussion
mf123
4 years agoFrequent Visitor
power bi sql server connection -object reference not set to a inatance of an object
i create a couple of months ago a report with power bi,using the sql server connection,with advanced options to type native query and direct query option,with no issues , but now i want to update a ...
mahenkj2
4 years agoSolution Sage
Hi mf123 ,
Since you say, you are editing native query, then perhaps the reason is: in your query, check if you are including database name such as 'databaseName.dbo.tablename'. if not, just add database name with all table names. Your table may be coming from 2 or more databases so need to tell individual tables. Else may also try to specifiy database name in sql server connection.
Sometimes, we write query in ssms with current database and dont need to specifiy databse name and just copy and paste in PowerBI. but it causes trouble later on.
Hope it helps.