#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2004
    Posts
    1
    Rep Power
    0

    About a SQL SELECT


    Hello.
    I have a problem with a SQL statement:
    SELECT ID FROM DEP WHERE ID='A';

    It works fine with a IB/FB manager, but I must do it in a Java app:

    Statement stm = Connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
    rs = stm.executeQuery("SELECT ID FROM DEP WHERE ID='A';");

    With a single "SELECT * FROM DEP", all works fine, but it doesn´t with a "WHERE" clause.

    Can anyone help me? please?

    Thank you everybody.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Oct 2003
    Location
    Germany
    Posts
    2,785
    Rep Power
    348
    Leave out the ; at the end. When sending SQL statements via JDBC you are not allowed to include the semicolon (true for all DBMS)

IMN logo majestic logo threadwatch logo seochat tools logo