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 & "')"
 
 
             con.Open()
             comm.CommandText = SQLtext
             comm.Connection = con
             dr = comm.ExecuteReader
 
 
 
             If dr.read() Then
                 response.redirect("customer.aspx?Login="& UserName.text)
             Else
                 Msg.Text = "Invalid user name/password ,Please try again"
             End If
 
         con.close()
         ClearControls()
 
         End Sub
 
 
    sub ClearControls()
          UserName.text=""
          UserPass.text=""
    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, networking, learning, and sharing knowledge.