Read records on first login

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • charvi
    New Member
    • May 2007
    • 121

    Read records on first login

    Hi
    I am working on a project which use VB.net as front end and MS-Access as back end.
    now i want to read the records from a table when i login for the first time.
    can anyone pls suggest me how to go with it
    Thanks in advance
  • vinot85
    New Member
    • Aug 2007
    • 53

    #2
    Hi buddy,
    this is simple ya.

    Just do the following after opening the connection.

    dim cmd as new OleDbCommand()
    cmd.CommandText = "select * from table_name"
    cmd.Connection = con
    dim reader as OleDbDataReader ()
    reader = cmd.ExecuteRead er()
    while(reader.Re ad())
    if reader.GetValue (0).Equals(Text Box1.Text) and reader.GetValue (1).Equals(Text Box2.Text) then
    MsgBox("Success ")
    end if
    EndWhile
    reader.Close()
    con.Close()


    regards,
    Vinoth

    Comment

    • r035198x
      MVP
      • Sep 2006
      • 13225

      #3
      @Vinoth,
      Hi Vinoth, please use code tags when posting code. You simply select the code and click the # icon (not the B one!)

      Comment

      Working...