Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2004
    Location
    INDIA
    Posts
    10

    Unanswered: Please help me in searching a perticular value of a coloumn...

    Please help me Guys ;
    I am using visual basic and oracle. I have a table in oracle which has two columns named "user_name" and "password". In visual basic I have a form which has two text boxes -- one for username and another for the password.

    I want that a user enters username and password in the respective text fields and the program should check whether or not that username and password exist in the table. If yes then it should proceed.

    For this I have made a recordset rs1 for user name and opened it like :
    rs1.open "select user_name from user_login where user_name = " &text1.text , cn, adopenstatic, adlockoptimistic

    But on running this gives an error that the column does'nt exist. But the column exist in reallity. I don't know what to do.

    Please friends help me, Please.

  2. #2
    Join Date
    Jan 2004
    Location
    Scottsdale, AZ
    Posts
    106
    I believe you will need single quote marks around your variable &text1.txt
    "Take Control!
    Make The Choice!
    Accept The Consequences!
    Deal With The Results! "

  3. #3
    Join Date
    May 2004
    Location
    Dominican Republic
    Posts
    721
    You might:
    (1) Debug your SQL in SQL*Plus (or any command line sql interprater).
    (2) SELECT the password, not the username to validate against what is on the other textbox.
    (3) To match to user_name column, since it is of type char or varchar, you should enclose it with ' and ' (i.e.: ".. where user_name ='" & text1.text & "'").

  4. #4
    Join Date
    Mar 2004
    Location
    INDIA
    Posts
    10

    Sorry friend but i do not understand

    The single quote mark makes the rest of the line as remark statement(rem statement)

    Please explain me clearly, help me please

  5. #5
    Join Date
    Mar 2004
    Location
    INDIA
    Posts
    10
    Thanks man you were a great help to me. Thanks again, it helped.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •