Pls. tell me what's wrong with this code, I really need a big help.....
tnx in advance...

Imports System.Data.OleDb

Module Module1

    Public admin As Boolean  'Use to identify if current user is Administrator

End Module


Public Class LoginForm1
  

    Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click
        Dim cn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source= C:\Documents and Settings\Administrator\Desktop\login\login\salesReportDataSet.xsd")


    

        Dim cmd As OleDbCommand = New OleDbCommand("SELECT Username FROM salesReportDataSet WHERE Login = '" & Username.Text & "' AND Password = '" & Password.Text & "' ", cn)

        cn.Open()
        Dim dr As OleDbDataReader = cmd.ExecuteReader()
        If (dr.Read() = True) Then
            Form1.Show()

        
            MsgBox("Login Successful, " & Username.Text & "!")
        Else

            MsgBox("Invalid login")
        End If
        'Else
    
        cn.Close()


    End Sub



    Private Sub Cancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel.Click
        Me.Close()
    End Sub

   
    Private Sub LoginForm1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
     


    End Sub
End Class

Can you tell us what happens before we have to puzzle?

(think about getting your car back to the shop & ask the technician if he can tell you what's wrong with your car?)

Unrecognized database format 'C:\Documents and Settings\Administrator\Desktop\login\login\salesReportDataSet.xsd'.

By the beard of Zeus, I'm guessing it doesn't know what kind of database your .xsd is..... how was it made?

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.