-
VB.NET (
http://www.daniweb.com/forums/forum58.html)
- -
login form (
http://www.daniweb.com/forums/thread173947.html)
| lerkei | Feb 6th, 2009 3:06 am | |
| login form 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 |
| 4advanced | Feb 6th, 2009 3:27 am | |
| Re: login form 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?) |
| lerkei | Feb 6th, 2009 3:54 am | |
| Re: login form Unrecognized database format 'C:\Documents and Settings\Administrator\Desktop\login\login\salesReportDataSet.xsd'. |
| Comatose | Feb 6th, 2009 9:30 am | |
| Re: login form By the beard of Zeus, I'm guessing it doesn't know what kind of database your .xsd is..... how was it made? |
| All times are GMT -4. The time now is 3:06 am. | |
Forum system based on vBulletin Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
©2003 - 2010 DaniWeb® LLC