Hello,
I recently purchased Web Messenger 5, and am struggling to override the GetContacts() function
I have a custom database and am using Cute Web Messenger standalone
THe table below (_UFriend) contains a list of paired id's (Profile, Friend)
Please help!
This is my code
Public Overrides Function GetContacts(ByVal identity As CuteChat.ChatIdentity) As CuteChat.IChatUserInfo()
Dim MyConnection As SqlConnection = New SqlConnection(sitewide.GetWriteConnectionString)
Dim MyCommand As SqlCommand = New SqlCommand("SELECT * FROM _UFriend WHERE Profile = " & HttpContext.Current.Session("UID"), MyConnection)
MyCommand.CommandType = CommandType.Text
Dim res As New ArrayList
MyConnection.Open()
Dim MyReader As SqlDataReader = MyCommand.ExecuteReader
If MyReader.HasRows Then
While MyReader.Read
res.Add("User:" & MyReader(1))
End While
End If
MyConnection.Close()
Return res.ToArray(GetType(CuteChat.IChatUserInfo))
End Function
Thanks