Solved

error Statement cannot appear within a method body. End of method assumed.

Posted on 2004-09-02
2
1,339 Views
Last Modified: 2008-02-26
i get this error anyone help?

Compiler Error Message: BC30289: Statement cannot appear within a method body. End of method assumed.

Source Error:

Line 102:        #End ExternalSource
Line 103:        
Line 104:        Public Sub New()
Line 105:            MyBase.New
Line 106:            Dim dependencies As System.Collections.ArrayList


Source File: C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\connectinglondon\61230c6b\282ab1ea\xgmmli6w.0.vb    Line: 104




<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="iso-8859-1" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.OleDb" %>
<html>

<script language="VB" runat="server">

             Sub Submit_Click(Sender as Object, e as EventArgs)
             Dim cnn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; data source=" & server.mappath("cl.mdb"))
                    Dim cmd As New OleDb.OleDbCommand
              Dim dr As Oledb.OleDbDataReader
 
 
 
  cmd.Connection = cnn
       cmd.CommandText = "SELECT email, pass FROM members WHERE email = " & email.Value & "AND pass = " & pass.Value

        cnn.Open()
        dr = cmd.ExecuteReader(commandbehavior.closeconnection)
        While dr.read
        Session("email") = dr.item("email")
        Session("pass") = dr.item("pass")
        End While
If Not IsDBNull(Session("email")) Then
    'You found a match do whatever
   Else
    'you didn't find a match do whatever
End If
     
        cnn.Close()

        cmd.Dispose()
        cnn.Dispose()
 
 
 
 
     </script>


<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form runat="server">
<table width="auto"  border="0">
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>Email Address: </td>
    <td><input type="text" ID="email" value="" runat="server"></td>
  </tr>
  <tr>
    <td>Password:</td>
    <td><input type="password" ID="pass" value="" runat="server"></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><input type="submit" OnServerClick="Submit_Click" value="Submit" runat="server"></td>
  </tr>
</table>



</form>


</body>
</html>
0
Comment
Question by:pigmentarts
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 9

Accepted Solution

by:
Thalox earned 500 total points
ID: 11961768

I think between

...
 cnn.Dispose()
 
 and
 
   </script>

there should be an end (or endsub, I dont have much expirience in vb)

Thalox
0
 
LVL 12

Author Comment

by:pigmentarts
ID: 11961796
thank you i have more error i need help with also will post when i get to them, thanks again
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question