this code is for a login page but i have a problem with it

<%@ Page Language="VB" Debug="True" %>
<%@ import Namespace="System.Data" %>
<%@ import Namespace="System.Data.oledb" %>
<script runat="server">
    Sub LoginBtn_Click(Sender As Object, E As EventArgs)
         dim con as oledbConnection= new oledbConnection
         dim comm as oledbcommand = new oledbCommand
         dim dr as oledbdatareader
         dim SQLtext as string
         con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source =Sales.mdb"
             SQLtext = "SELECT * FROM Login WHERE" & "(UserID='" & UserName.text & "'AND " & "UserPass ='" & UserPass.text & "')"
             comm.CommandText = SQLtext
             comm.Connection = con
             dr = comm.ExecuteReader
             If Then
                 response.redirect("customer.aspx?Login="& UserName.text)
                 Msg.Text = "Invalid user name/password ,Please try again"
             End If
         End Sub
    sub ClearControls()
    End Sub

the error is Could not find installable ISAM. :rolleyes:
the following lines are from the next page (customer.aspx), but it is appears when i login :?:
Source Error:

Line 18: myAdaptor.SelectCommand=new oleDbCommand (strcommand,myconnect)Line 19: 'myAdaptor.selectCommand.connection.openLine 20: myAdaptor.fill(salesDS,"customer")Line 21: Customer.DataSource=salesDS.Tables("Sales")Line 22: Customer.DataBind

Recommended Answers

All 2 Replies

thanks :cheesy:

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.