Skip to Content
0
Oct 26, 2020 at 04:07 PM

How can I modify a database link that has has a guid in a field

35 Views

I have a report that was using odbc for the connection but now it is using OLE DB (ADO) (MSOLEDBSQL). With OLE, when a GUID field comes from SQL Server, the guid is wrapped by braces "{ }". If a string parameter has a guid passed in, we have to be sure that in our code or in the report we add the braces to the parameter or remove the braces from the database field when comparing the fields. My first question is, "is there a better way for handling guids"?

If the report is using a link like Test_ttx.UID --> vw_Test.UID, where Test_ttx.UID comes from an xml (ADO.NET (XML)) and vw_Test.UID comes from a database view, the report never renders data because the comparison isn't an exact match due to the braces. To get around the problem I have remove the link and created a selection formula like {vw_Test.UID} = "{" + {Test_ttx.UID} + "}". This works but I was wondering if there is a way to do the same sort of action on the link? Or even do a "contains" instead of "=" comparison?