Forum Discussion
RobertRR
2 years agoFrequent Visitor
How to display objects in a grouping
I would like to know if there is any way to display the query values for an external data source in object format and not in plain text with the concatenated values. To do this, I need to create a gr...
Anonymous
2 years agoNot applicable
Hi RobertRR ,
You want to display the query value of the external data source in object format, not in plain text with the join value. This may require custom code.
Best Regards,
Xianda Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
RobertRR
2 years agoFrequent Visitor
I understand, I expected that. However, I have no idea how to do this with custom code, I searched the Microsoft documentation and didn't find anything related. I would be grateful if you could help me find a code example.
- Anonymous2 years agoNot applicable
Hi RobertRR ,
Here is the sample:
Public Function GetUsers(ByVal param As Integer) As String Dim sqlCon As New System.Data.SqlClient.SqlConnection Dim cmd As New System.Data.SqlClient.SqlCommand Dim dRet As String Dim sCmdText As String sqlCon.ConnectionString = "data source=MYSERVER;initial catalog=MYDB;Integrated Security=true" cmd = New System.Data.SqlClient.SqlCommand sCmdText = "SELECT dbo.udf_MyFunction(" 'cmd.CommandType = CommandType.Text cmd.Connection = sqlCon cmd.CommandTimeout = 0 sCmdText = sCmdText & param sCmdText = sCmdText & ")" cmd.CommandText = sCmdText If sqlCon.State <> System.Data.ConnectionState.Open Then sqlCon.Open() End If dRet = cmd.ExecuteScalar() & "" sqlCon.Close() Return dRet End FunctionBelow is the official link will help you:
Best Regards,
Xianda Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.