Thread: Login validating from a local and remote db

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #5
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    Just for future reference....

    You should check the input (in textBox1 ) is a valid ID prior to calling the DB.

    You should always check the exact number of rows returned, if rows returned is not 1 then login is unsuccessful.

    If I entered into the textbox "12345 or 1=1" would I get logged in?

    Your main Oracle code is in the 'finally' block.
    This is not good practice, the finally block should be used for clean-up only (closing the connection).
    Your code risks throwing an exception in the 'finally' and leaving DB connections open.
    Last edited by novacain; 09-11-2015 at 08:37 PM.
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 6
    Last Post: 01-02-2015, 10:13 PM
  2. Remote login
    By ajayb in forum C Programming
    Replies: 3
    Last Post: 01-17-2011, 02:06 AM
  3. Replies: 8
    Last Post: 12-08-2009, 12:55 PM
  4. How to keep local and remote DB in sync
    By nicksnels in forum Tech Board
    Replies: 0
    Last Post: 09-10-2007, 02:17 AM
  5. Intercepting Data Bound for Local Application from Remote Server
    By maththeorylvr in forum Networking/Device Communication
    Replies: 2
    Last Post: 11-29-2005, 01:57 AM

Tags for this Thread