Access Database in VB.NET

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ANGELSDAGGER
    New Member
    • Aug 2007
    • 14

    #1

    Access Database in VB.NET

    I have an Access Database connected to my VB.NET project. I'm having trouble with the Queries. Does anyone know the correct Syntax to use a WHERE statement in the SQL query. i.e.

    strSQL = "Select Usernames from login_details WHERE Passwords = sumVariable"

    because right now I've tried loads and can't get it to work.

    Please HELP!!!
  • gkinu
    New Member
    • Sep 2006
    • 22

    #2
    Am hoping i understand you. You are trying to do something like this:-


    Code:
    dim sumVariable as string
    sumVariable = "password"
    strSQL = "Select Usernames from login_details WHERE Passwords = '" & sumVariable & "'"
    NOTE THE Single Quote within the string

    Comment

    Working...