derby Encountered: "@"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • oll3i
    Contributor
    • Mar 2007
    • 679

    derby Encountered: "@"

    when i run sql query
    select * from GRABBER.CANDIDA TES where EMAIL=xxx@xxxxx .xx
    i get
    Error code -1, SQL state 42X02: Lexical error at line 1, column 55. Encountered: "@" (64), after : "".


    when i do select * from GRABBER.CANDIDA TES where EMAIL=mmmm
    i get an error that column "mmmm" doesnt exists


    when i run select EMAIL from GRABBER.CANDIDA TES where id=1
    it works fine
    ?


    ?

    thank You
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Use single quotes around those String values; better yet, use PreparedStateme nts for that purpose, they do the nitty gritty work for you.

    kind regards,

    Jos

    Comment

    • oll3i
      Contributor
      • Mar 2007
      • 679

      #3
      thank You Jos

      i do
      resultSet.last( );
      this.numberOfRo ws = resultSet.getRo w();
      to get the number of rows
      but then i want to return these records as a map
      but when i do resultSet.last( ); it doesnt display any rows
      how do i come back to the first record?

      Comment

      • oll3i
        Contributor
        • Mar 2007
        • 679

        #4
        i did resultSet.first (); but it doesnt display records

        Comment

        • JosAH
          Recognized Expert MVP
          • Mar 2007
          • 11453

          #5
          Originally posted by oll3i
          thank You Jos

          i do
          resultSet.last( );
          this.numberOfRo ws = resultSet.getRo w();
          to get the number of rows
          but then i want to return these records as a map
          but when i do resultSet.last( ); it doesnt display any rows
          how do i come back to the first record?
          Make your result set scrollable (read its API documentation), After moving to the last row and getting the row number move back to the first row again.

          kind regards,

          Jos

          Comment

          • oll3i
            Contributor
            • Mar 2007
            • 679

            #6
            hmm it does return the records when i did system.outs i see it in the server log must be something wrong with my map

            Comment

            • oll3i
              Contributor
              • Mar 2007
              • 679

              #7
              silly error i know what is wrong i did not do the assignment :( hihi

              Comment

              • oll3i
                Contributor
                • Mar 2007
                • 679

                #8
                okey i'm done with it yet i have another problem

                i am writing a web service that proccesses a cv extracts data from it and sends it to jsp page then i send it to the db
                but when i extract data from one cv and try to extract data from another cv jsp remembers the old data and displays it instead of the new data

                Comment

                • oll3i
                  Contributor
                  • Mar 2007
                  • 679

                  #9
                  my service remembered it i just made it all null after extracting and displaying

                  Comment

                  • oll3i
                    Contributor
                    • Mar 2007
                    • 679

                    #10
                    my server is complaining about
                    error: Wrapper class grabber.SetLast NameNull is not found. Have you run APT to generate them?

                    when i dont have SetLastNameNull function i have setLastNameNull function i dont use SetLastNameNull function anywhere ?

                    Comment

                    • JosAH
                      Recognized Expert MVP
                      • Mar 2007
                      • 11453

                      #11
                      Originally posted by oll3i
                      my server is complaining about
                      error: Wrapper class grabber.SetLast NameNull is not found. Have you run APT to generate them?

                      when i dont have SetLastNameNull function i have setLastNameNull function i dont use SetLastNameNull function anywhere ?
                      This is a job for grep: grep your source files for "SetLastNameNul l"; I'm sure grep will find a hit because a server is way too stupid to make such an error up.

                      kind regards,

                      Jos

                      Comment

                      Working...