C
Chumley the Walrus
I'm trying to do some ASP date formatting in a separate include file
on my .aspx page, but I keep getting "Statement cannot appear within
method body, expected end of statement" error when running this page.
The header code begins as:
<%@ Page Language="VB" debug="true"%>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SQLClient" %>
<!-- #include file=dayofweekparse.asp -->
<script language="VB" runat="server">
Sub Page_Load(Src As Object, E As EventArgs)
Dim strConn as string
="SERVER=xxx.xxx.xx.xx;UID=xxxx;PWD=xxxx;DATABASE=xxxx;"
Dim strSQL as string ="select events from EventTable"
Dim Conn as New sqlConnection(strConn)
Dim Cmd as New sqlCommand(strSQL,Conn)
Conn.Open()
thedata.DataSource =
Cmd.ExecuteReader(system.data.CommandBehavior.CloseConnection)
thedata.DataBind()
End Sub
</script>
????????
Chumley
on my .aspx page, but I keep getting "Statement cannot appear within
method body, expected end of statement" error when running this page.
The header code begins as:
<%@ Page Language="VB" debug="true"%>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SQLClient" %>
<!-- #include file=dayofweekparse.asp -->
<script language="VB" runat="server">
Sub Page_Load(Src As Object, E As EventArgs)
Dim strConn as string
="SERVER=xxx.xxx.xx.xx;UID=xxxx;PWD=xxxx;DATABASE=xxxx;"
Dim strSQL as string ="select events from EventTable"
Dim Conn as New sqlConnection(strConn)
Dim Cmd as New sqlCommand(strSQL,Conn)
Conn.Open()
thedata.DataSource =
Cmd.ExecuteReader(system.data.CommandBehavior.CloseConnection)
thedata.DataBind()
End Sub
</script>
????????
Chumley