![]() |
Complete beginner needs help
Good morning everyone,
I have been doing VB development for 10+years and am just now starting to 'weasel' myself into ASP/Javascript and was wondering if someone could tell me why I get the following error when I load this page: [PAGE] <%@ Page Language="VB" %> <script runat="server"> Sub Page_Data Dim oDR as System.Data.SQLClient.SQLDataReader Dim oCom As System.Data.SQLClient.SqlCommand Dim oConn as System.Data.SQLClient.SQLConnection Try oConn = New System.Data.SQLClient.SQLConnection ("server=192.168.1.185\SQLEXPRESS; initial catalog=BUWG_NEW;uid=****;pwd=****") oConn.Open() oCom = New System.Data.SQLClient.SqlCommand() oCom.Connection = oConn oCom.CommandText = "SELECT * FROM tblEQUIPMENT WHERE TYPE=TRAILER AND STATUS=TRUE ORDER BY NUMBER" oDR = oCom.ExecuteReader() While oDR.Read Response.Write(oDR.Item("Number") & ", " & oDR.Item("LOCATION") & "," & oDR.Item("COMMENTS")) Response.Write("<BR/>") End While Catch Response.Write("Error:" & err.Description) Finally oDR = Nothing oCom = Nothing oConn.Close() oConn = Nothing End Try End Sub </script> <html> <title>Equipment Table</title> <body bgcolor="FFFFFF"> <h2>Query from table <b>Equipment</b> with ASP.NET</h2> <%Page_Data()%> </body> </html> [/PAGE] [ERROR] Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E; MS STORE DMC2.6.3411.2; Alexa Toolbar) Timestamp: Fri, 15 Feb 2013 11:17:21 UTC Message: Expected ';' Line: 4 Char: 5 Code: 0 URI: http://192.168.1.185/trailers.htm [/ERROR] Any and all help is appreciated. MTIA! |
| All times are GMT +1. The time now is 01:23 PM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.