Shared Function lastpost(ByVal title As String) As Results
Dim con As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Documents and Settings\perkinj\My Documents\Visual Studio 2010\WebSites\runningprofiles\forums\forum.mdb;")
Dim cmd As New OleDbCommand
cmd.Connection = con
cmd.Parameters.AddWithValue("@title", title)
Try
con.Open()
Dim Res As Results
cmd.CommandText = "Select Count(*) From forum where Forum =@title and numrep <> 0 "
Res.Result2 = cmd.ExecuteScalar()
cmd.CommandText = "Select title + '|' + LastPoster +'|' + Format(lasttime, 'dd/mm/yyyy hh:mm:ss') from forum where Forum =@title order by Format(lasttime, 'dd/mm/yyyy hh:mm:ss') ASC"
Res.Result3 = cmd.ExecuteScalar()
Return (Res)
Catch ex As Exception
Throw ex
Finally
con.Close()
End Try
End Function
Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.
Our community of experts have been thoroughly vetted for their expertise and industry experience.