login form

Please support our VB.NET advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Jan 2008
Posts: 36
Reputation: lerkei is an unknown quantity at this point 
Solved Threads: 0
lerkei lerkei is offline Offline
Light Poster

login form

 
0
  #1
Feb 6th, 2009
Pls. tell me what's wrong with this code, I really need a big help.....
tnx in advance...

  1. Imports System.Data.OleDb
  2.  
  3. Module Module1
  4.  
  5. Public admin As Boolean 'Use to identify if current user is Administrator
  6.  
  7. End Module
  8.  
  9.  
  10. Public Class LoginForm1
  11.  
  12.  
  13. Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click
  14. Dim cn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source= C:\Documents and Settings\Administrator\Desktop\login\login\salesReportDataSet.xsd")
  15.  
  16.  
  17.  
  18.  
  19. Dim cmd As OleDbCommand = New OleDbCommand("SELECT Username FROM salesReportDataSet WHERE Login = '" & Username.Text & "' AND Password = '" & Password.Text & "' ", cn)
  20.  
  21. cn.Open()
  22. Dim dr As OleDbDataReader = cmd.ExecuteReader()
  23. If (dr.Read() = True) Then
  24. Form1.Show()
  25.  
  26.  
  27. MsgBox("Login Successful, " & Username.Text & "!")
  28. Else
  29.  
  30. MsgBox("Invalid login")
  31. End If
  32. 'Else
  33.  
  34. cn.Close()
  35.  
  36.  
  37. End Sub
  38.  
  39.  
  40.  
  41. Private Sub Cancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel.Click
  42. Me.Close()
  43. End Sub
  44.  
  45.  
  46. Private Sub LoginForm1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  47.  
  48.  
  49.  
  50. End Sub
  51. End Class
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 63
Reputation: 4advanced is an unknown quantity at this point 
Solved Threads: 10
4advanced 4advanced is offline Offline
Junior Poster in Training

Re: login form

 
0
  #2
Feb 6th, 2009
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?)
Last edited by 4advanced; Feb 6th, 2009 at 4:28 am.
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 36
Reputation: lerkei is an unknown quantity at this point 
Solved Threads: 0
lerkei lerkei is offline Offline
Light Poster

Re: login form

 
0
  #3
Feb 6th, 2009
Unrecognized database format 'C:\Documents and Settings\Administrator\Desktop\login\login\salesReportDataSet.xsd'.
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: login form

 
0
  #4
Feb 6th, 2009
By the beard of Zeus, I'm guessing it doesn't know what kind of database your .xsd is..... how was it made?
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC