Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.
Shared Function pstcount(ByVal forumname As String) As Results Dim con As New SqlConnection(local) Dim cmd As New SqlCommand cmd.Connection = con cmd.Parameters.AddWithValue("@forumname", forumname) Try con.Open() cmd.CommandText = "Select Count(*) From forum where Forum =@forumname" Dim Res As Results Res.Result1 = cmd.ExecuteScalar() cmd.CommandText = "Select Count(*) From forum where Forum =@forumname and numrep = 0 " Res.Result2 = cmd.ExecuteScalar() cmd.CommandText = "Select TOP 1 title +'|'+ LastPoster +'|'+ CONVERT(VARCHAR(256), lasttime, 120) +'|'+ CAST(ID AS VARCHAR(256)) +'|'+ CAST(numrep AS VARCHAR(256)) from forum where Forum =@forumname order by lasttime DESC" Res.Result3 = cmd.ExecuteScalar() Return (Res) Catch ex As Exception Throw ex Finally con.Close() End Try End Function
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|VB.NET - Refactor Class per SOLID principles||2||40|
|VB.Net Data Class||1||44|
|Sending HTML Formatted Email from ASP.NET||2||53|
|Building Collections of Objects based on their Tag Property||33||53|
Join the community of 500,000 technology professionals and ask your questions.