| | |
Going from ASP 3.0 to VB.NET
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Aug 2006
Posts: 1
Reputation:
Solved Threads: 0
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:
Thanks in advance for everything.
The code is as follows:
VB.NET Syntax (Toggle Plain Text)
<%@ 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() %>
![]() |
Similar Threads
- ASP.NET and Mozilla - Issues! (ASP.NET)
- Question for ASP.NET/Mozilla Users...or anyone... (ASP.NET)
- Newsgroups in ASP.NET forums??? (ASP.NET)
- ASP.Net hide site in the tray??? (ASP.NET)
- ASP.NET controls in Office 2003 style? (ASP.NET)
- .NET Speech SDK for ASP.NET (ASP.NET)
Other Threads in the VB.NET Forum
- Previous Thread: Term Project Ideas Please
- Next Thread: Variables
| Thread Tools | Search this Thread |
"crystal .net .net2005 30minutes 2005 2008 access account arithmetic array basic binary bing button buttons center check code combobox component connectionstring convert crystalreport data database databasesearch datagrid datagridview design dissertation dissertations dissertationthesis dosconsolevb.net dropdownlist excel file-dialog firewall folder ftp google hardcopy image images insert listview login math memory mobile ms navigate net networking opacity output passingparameters peertopeervideostreaming picturebox picturebox1 plugin port print problemwithinstallation project reports" save savedialog searchbox serial server soap sql string table tcp temp text textbox timer toolbox trim update updown upload useraccounts usercontrol vb vb.net vb.netcode vb.netformclosing()eventpictureboxmessagebox vb.nettoolboxvisualbasic2008sidebar vb2008 vbnet view visual visualbasic visualbasic.net visualstudio web wpf





