I am working on a personal project as part of learning ASP.Net and I can not figure out how to do this. I have code that is VB for ASP 3.0 and trying to translate it to ASP.NET. It reads data for a MySql Database and displays it on the page. (Actually reading from a PhpBB forum as part of a Latest News type listing on Main Site Page). I have searched and every example I find can not get it to work. Would really like to keep it in VB.NET as it would be easy then to incorporate with rest of site. Have tried to make it as a web page all to itself and even as a Web User Control (which would be really great). So really getting frustrated and any help would be appreciated, whether it be code example, site with tutorial or even a Book that I could go get.
Thanks in advance for everything.
The code is as follows:
<%@ Language="VBScript" %>
' Include Ado Utilities for Connections and data manipulation
<!-- #include file="modAdoUtils.asp" -->
<%
Dim m_arrRecords ' Array to hold news info
Dim m_i ' Record Counter
Dim m_objAdoRs ' Recordset to draw the data from the DB
' Open the database connection
Call OpenConnection()
' Get records into the recordset
Set m_objAdoRs = GetRecordSet("select n.post_subject, n.post_text from eq_posts_text n,eq_posts p where n.post_id = p.post_id and p.forum_id=6",3,3)
'Check for records
If m_objAdoRs.RecordCount > 0 Then
' Save the records into an array for speed
m_arrRecords = m_objAdoRs.GetRows()
' Loop through and write the News to the screen.
For m_i = 0 to UBound(m_arrRecords,2)
Response.Write "<b><i>" & (m_arrRecords(0,m_i)) &"</b></i>" & vbCrLf
Response.Write " " & (m_arrRecords(1,m_i)) & vbCrLf
Response.Write " " & vbCrLf
Next
Else
' No news found in table
Response.Write "No News found at this time." & vbCrLf
End If
' Clean up
m_objAdoRs.Close
Set m_objAdoRs = Nothing
Call CloseConnection()
%>