Hi,

I'm with a little problem, here is the code:
[VB] Code:
  1. Imports System
  2. Imports System.Data
  3. Imports System.Data.OleDb
  4.  
  5.  
  6. Public Class LoginForm1
  7.     Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click
  8.         Dim ConexaoBD As OleDbConnection
  9.         Dim DsDados As DataSet
  10.  
  11.         Dim sqlStringUser As String = "SELECT * FROM user WHERE USERNAME='" & tbUsername.Text & "' and PASSWORD='" _
  12.                                     & tbPassword.Text & "'"
  13.         ConexaoBD = New OleDbConnection(connstring)
  14.  
  15.         Dim AdaptadorDadosUser As OleDbDataAdapter = New OleDbDataAdapter(sqlStringUser, ConexaoBD)
  16.         DsDados = New DataSet()
  17.  
  18.         AdaptadorDadosUser.Fill(DsDados, "user")
  19.  
  20.         If DsDados.Tables("user").Rows.Count() = 0 Then
  21.             MsgBox("Username ou Password Errada", MsgBoxStyle.Critical + MsgBoxStyle.OkOnly, "ERRO")
  22.             tbUsername.Text = ""
  23.             tbPassword.Text = ""
  24.             tbUsername.Focus()
  25.         Else
  26.             frmmdi.Show()
  27.             Me.Close()
  28.         End If
  29.  
  30.     End Sub
  31.  
  32.     Private Sub Cancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel.Click
  33.         Me.Close()
  34.     End Sub
  35. End Class

the problem is when I try to login, there a bug says there is a error sintax in the "from"