Hi there i started to develope my first application based on the teaching within the asp.net 1.1 for beginners book.... i am using chapter 17 to create a login of my own and its gone wrong i dont understand why! please can anyone offer help?
error:
Compiler Error Message: BC30002: Type 'OLEDBConnection' is not defined.
code:
<%@ Page Language="
VB" %>
<script runat="server">
' Insert page code here
'
Sub Login_Click(sender As Object, e As EventArgs)
Dim strConn as string ="PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" & server.mappath("database/store.mdb") & ";"
Dim Conn as New OLEDBConnection(strConn)
Conn.Open()
Dim strSQL as string = "SELECT UserPass FROM UserDetails WHERE UserName = '" & txtAdminLogin.Text & "'"
Dim Cmd as New OLEDBCommand(strSQL,Conn)
'Create a datareader, connection object
Dim Dr as OLEDBDataReader = Cmd.ExecuteReader(System.Data.CommandBehaviour.Clo seConnection)
'Get the first row and check the password
If Dr.Read()
If Dr("UserPass").ToString = txtAdminPasswd.text Then
FormAuthentication.RedirectFromLoginPage(txtAdminL ogin.text, false)
Else
lblLoginMsg.text = "Sorry that was an invalid password"
End If
Else
lblLoginMsg.text = "Sorry that user name was not found"
End If
Dr.Close
End Sub
</script>
<html>
<head>
<link href="../includes/shop.css" type="text/css" rel="stylesheet" />
</head>
<body>
<form runat="server">
<p align="center">
<img src="images/logo.gif" />
</p>
<p align="center">
Admin Login:
<asp:TextBox id="AdminLogin" runat="server"></asp:TextBox>
<br />
Admin Password:
<asp:TextBox id="AdminPasswd" runat="server" TextMode="Password"></asp:TextBox>
</p>
<p align="center">
<asp:Label id="lblLoginMsg" runat="server" forecolor="#ff000"></asp:Label>
</p>
<p align="center">
<asp:Button id="btnLogin" onclick="Login_Click" runat="server" Text="Login"></asp:Button>
</p>
<p align="center">
Copyright 2004 dj-store
</p>
</form>
</body>
</html>
cheers.... i dont know if i am cut out for this application developing malarky