Forum Discussion
Credentials are required to connect to the SQL source when using parameter for query
You will have to turn off the Gateway option for it to work?
Hi GilbertQ ,
I turned off the Gateway but still getting this error 'Credentials are required to connect to the SQL source.' when trying to refresh. Please advise what else can I try.
Thanks
Vy
- GilbertQ6 years agoSuper UserCan you post the connection string to the SQL Server?
As well as the actual error message?- Anonymous6 years agoNot applicable
Hi GilbertQ ,
So I created two reports, the first one is calling stored procedures test.spTest and passing in 3 like below
let
Source = Sql.Database("server", "database", [Query="exec [test].[spTest] @SiteNo = 3"])
in
SourceThe second report calling the same stored procedures but passing in the parameter SiteNo. Both of reports are working fine in Power BI desktop.
let
Source = Sql.Database("server", "database", [Query="exec [test].[spTest] @SiteNo = " & Number.ToText(SiteNo)])
in
SourceWhen I publish to my dashboard, I can see the gateway and able to select the data source then refresh the first report but get the message 'not configured correctly' when turn on gateway on the second report. This just happened recently as of June 25. Could you please try create a simple report with one parameter and see if it works for you? Also, I notice if the parameter I have as string then it's working but if parameter is number and I have to use Number.ToText then it's not working. Same as using Date.ToText() then it's not working.
- Anonymous6 years agoNot applicable
I have a similar problem.
Same reports works on desktop PBI but does not work when trying to update data from web using a gateway.
Examples:
I build the query with strings/variables concatenation.
Depending how I set the concatenated variable, it works on both the environments or only from desktop:
variable = "" WORKS
variable = if 1=1 then "" else "" WORKS ONLY FROM DESKTOP
variable = "'" & "0" & "'" WORKS
variable = "'" & Number.ToText(0) & "'" WORKS ONLY FROM DESKTOP
(These examples are real tests made after I became desperate)