Thanks Adam for your quick response. Here is how I have implemented this method:
Dim MemberName As String = ""
Dim cmd As New SqlCommand
cmd.Connection = New SqlConnection(GetConnectionString(Nothing))
cmd.CommandText = "SELECT FirstName,LastName FROM Members WHERE MemberID = " & useruniquename
cmd.Connection.Open()
Try
Dim sdr As SqlDataReader = cmd.ExecuteReader()
Try
Do While sdr.Read()
MemberName = sdr.GetString(0) & " " & sdr.GetString(1)
Loop
Finally
sdr.Close()
End Try
Finally
cmd.Connection.Close()
End Try
Return MemberName
However I am still getting the value coming from the DisplayName field of the CuteChatUser table. Am I missing something?
Thanks.