thanks for this jm..

but can you do a explanation in this code..

vb Code:
  1. Dim command As New OleDb.OleDbCommand("SELECT * FROM tblUserAccount WHERE Username = '" & txtUserName.Text & "' AND Password = '" & txtPassword.Text & "'", _
  2.                                           connection)
  3.  
  4.             With command.Parameters
  5.                 .AddWithValue("Username", txtUserName.Text)
  6.                 .AddWithValue("Password", txtPassword.Text)
  7.             End With
  8.  
  9.             connection.Open()
  10.  
  11.             'Execute the query.
  12.             If CInt(command.ExecuteScalar()) = 0 Then              
  13.                 MsgBox(" failed Login")
  14.             Else
  15.                 main.Show()
  16.             End If

sorry new in vb.net
what is the use of this code
command.Parameters
.AddWithValue
CInt(command.ExecuteScalar()) = 0

thanks