Click here to Skip to main content
15,888,330 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: File Attribute / Owner of file Pin
Nanda_MR29-Jan-09 1:37
Nanda_MR29-Jan-09 1:37 
GeneralRe: File Attribute / Owner of file Pin
pedefetoll29-Jan-09 2:19
pedefetoll29-Jan-09 2:19 
AnswerRe: File Attribute / Owner of file Pin
dan!sh 29-Jan-09 3:51
professional dan!sh 29-Jan-09 3:51 
QuestionHow to schudule a click of button(VB .Net) in windows scheduler? Pin
Ramki Sankaran28-Jan-09 23:22
Ramki Sankaran28-Jan-09 23:22 
AnswerRe: How to schudule a click of button(VB .Net) in windows scheduler? Pin
Ashfield29-Jan-09 1:19
Ashfield29-Jan-09 1:19 
AnswerRe: How to schudule a click of button(VB .Net) in windows scheduler? Pin
Dave Kreskowiak29-Jan-09 3:28
mveDave Kreskowiak29-Jan-09 3:28 
GeneralRe: How to schudule a click of button(VB .Net) in windows scheduler? Pin
Jon_Boy29-Jan-09 3:37
Jon_Boy29-Jan-09 3:37 
QuestionLog On screen in VB.Net Pin
vijay248228-Jan-09 22:45
vijay248228-Jan-09 22:45 
Imports System.Data.OleDb

Public Class Form1
Dim con As New OleDb.OleDbConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source = C:\Downloads\user.mdb")

Dim cmd As OleDb.OleDbCommand


Private Sub LogOn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LogOn.Click

Dim sql As String

sql = "SELECT Username,Password FROM user WHERE Username='" & TextBox1.Text & "' AND Password='" & TextBox2.Text & "'"


cmd = New OleDb.OleDbCommand(sql, con)
con.Open()
Dim dr As OleDb.OleDbDataReader = cmd.ExecuteReader

Try

Catch ex As InvalidOperationException
MsgBox(ex.Message)

End Try


Try
If dr.Read = False Then
MessageBox.Show("Logon failed...")
Else
MessageBox.Show("Logon successfully...")
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try



con.Close()




End Sub
End Class



this is my code

i get an error msg stating OleDb Exception was unhandled and syntax error in FROM clause

can sombody fix this issue??

thanks
AnswerRe: Log On screen in VB.Net Pin
Eddy Vluggen29-Jan-09 0:43
professionalEddy Vluggen29-Jan-09 0:43 
GeneralRe: Log On screen in VB.Net Pin
vijay248229-Jan-09 1:17
vijay248229-Jan-09 1:17 
GeneralRe: Log On screen in VB.Net Pin
Eddy Vluggen29-Jan-09 1:52
professionalEddy Vluggen29-Jan-09 1:52 
AnswerRe: Log On screen in VB.Net Pin
Ashfield29-Jan-09 1:22
Ashfield29-Jan-09 1:22 
AnswerRe: Log On screen in VB.Net Pin
Dave Kreskowiak29-Jan-09 3:25
mveDave Kreskowiak29-Jan-09 3:25 
GeneralRe: Log On screen in VB.Net Pin
vijay248229-Jan-09 4:11
vijay248229-Jan-09 4:11 
QuestionRe: Log On screen in VB.Net Pin
dan!sh 29-Jan-09 4:18
professional dan!sh 29-Jan-09 4:18 
AnswerRe: Log On screen in VB.Net Pin
vijay248229-Jan-09 4:19
vijay248229-Jan-09 4:19 
GeneralRe: Log On screen in VB.Net Pin
Dave Kreskowiak29-Jan-09 18:22
mveDave Kreskowiak29-Jan-09 18:22 
GeneralRe: Log On screen in VB.Net Pin
vijay248229-Jan-09 21:19
vijay248229-Jan-09 21:19 
QuestionVB6.0 Pin
Caryldain28-Jan-09 22:31
Caryldain28-Jan-09 22:31 
AnswerRe: VB6.0 Pin
Nanda_MR28-Jan-09 23:24
Nanda_MR28-Jan-09 23:24 
AnswerRe: VB6.0 Pin
solomondevapaul12328-Jan-09 23:43
solomondevapaul12328-Jan-09 23:43 
Questionhexadecimal conversion Pin
aswd28-Jan-09 20:48
aswd28-Jan-09 20:48 
AnswerRe: hexadecimal conversion Pin
Ashutosh Phoujdar28-Jan-09 21:12
Ashutosh Phoujdar28-Jan-09 21:12 
GeneralRe: hexadecimal conversion Pin
aswd28-Jan-09 21:25
aswd28-Jan-09 21:25 
AnswerRe: hexadecimal conversion Pin
Alan N29-Jan-09 2:47
Alan N29-Jan-09 2:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.