Going from ASP 3.0 to VB.NET

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Aug 2006
Posts: 1
Reputation: AlexC-FL is an unknown quantity at this point 
Solved Threads: 0
AlexC-FL AlexC-FL is offline Offline
Newbie Poster

Going from ASP 3.0 to VB.NET

 
0
  #1
Aug 21st, 2006
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:
  1. <%@ Language="VBScript" %>
  2.  
  3. ' Include Ado Utilities for Connections and data manipulation
  4. <!-- #include file="modAdoUtils.asp" -->
  5.  
  6. <%
  7. Dim m_arrRecords ' Array to hold news info
  8. Dim m_i ' Record Counter
  9. Dim m_objAdoRs ' Recordset to draw the data from the DB
  10.  
  11. ' Open the database connection
  12. Call OpenConnection()
  13.  
  14. ' Get records into the recordset
  15. 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)
  16.  
  17. 'Check for records
  18. If m_objAdoRs.RecordCount > 0 Then
  19. ' Save the records into an array for speed
  20. m_arrRecords = m_objAdoRs.GetRows()
  21. ' Loop through and write the News to the screen.
  22. For m_i = 0 to UBound(m_arrRecords,2)
  23. Response.Write "<b><i>" & (m_arrRecords(0,m_i)) &"</b></i>" & vbCrLf
  24. Response.Write " " & (m_arrRecords(1,m_i)) & vbCrLf
  25. Response.Write " " & vbCrLf
  26. Next
  27. Else
  28. ' No news found in table
  29. Response.Write "No News found at this time." & vbCrLf
  30. End If
  31.  
  32. ' Clean up
  33. m_objAdoRs.Close
  34. Set m_objAdoRs = Nothing
  35. Call CloseConnection()
  36. %>
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC