May 4, 2020 at 4:16 pm
oh happy day, I figured it out! My select statement all along has been;
DBType = d.value('(rd:DBType)[1]','varchar(max)'),
when it should have been;
DbType = d.value('(rd:DbType)[1]','varchar(max)'),
I now get 'String' for all but @Companies which has an (unspecified) data type. Can't believe I reviewed that code many times and did not see it.
I did not replace 'SQLS' with 'sqls'; the report designer URL is stored by Microsoft as 'SQLServer', so it has never made sense to me that it needed to be changed to lowercase.
thank you Brian, regards, beth
May 4, 2020 at 4:21 pm
Glad it works!
Also, figured out why I needed it lowercase as I was confused on that too, it was just how it worked for me. The URL in the XML needs to be the same case as the WITH XMLNAMESPACES section. So for those who are looking at this later, if your XML has uppercase in it, the XMLNAMESPACES needs to use the same case.
The above is all just my opinion on what you should do.
As with all advice you find on a random internet forum - you shouldn't blindly follow it. Always test on a test server to see if there is negative side effects before making changes to live!
I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.
Viewing 2 posts - 16 through 16 (of 16 total)
You must be logged in to reply to this topic. Login to reply