Page 2 of 2 FirstFirst 12
Results 21 to 22 of 22
  1. #21
    nick2price is offline Member
    Join Date
    May 2008
    Posts
    27
    Rep Power
    0

    Default

    eveType2 is a String variable i.e. String eveType2 = "......
    I dont think i can use setString as i am not using a preparedstatement here. I think its somthing to do with the way i do the quotations?

    No worries, all done, done it like
    "WHERE Event_Name='" + eveType2 + "'";
    cheers for the help
    Last edited by nick2price; 09-29-2008 at 02:07 PM.

  2. #22
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    If the statement used is the one shown, yes you can.

    And you should worry, doing it that way opens you up to all sorts of possible errors (and malicious attacks).

    Edit: As I said earlier, modify it to use PreparedStatement.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Question mark colon operator question
    By orchid in forum Advanced Java
    Replies: 9
    Last Post: 12-19-2010, 08:49 AM
  2. Replies: 0
    Last Post: 04-01-2008, 10:17 AM
  3. Replies: 0
    Last Post: 09-28-2007, 12:56 PM
  4. Statement or Prepared Statement ?
    By paty in forum JDBC
    Replies: 3
    Last Post: 08-01-2007, 04:45 PM

Posting Permissions

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