Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. OAR-00904 INVALID COLUMN

OAR-00904 INVALID COLUMN

Scheduled Pinned Locked Moved Visual Basic
oraclehelpquestion
6 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Silver Grey
    wrote on last edited by
    #1

    I am getting an invalid column error from oracle from the following code: I checked the columns and they are ok, any ideas ??? "Select A1.PART_CODE, A1.PO_NUMBER, A1.PO_LINE_NUMBER, A3.RECEIVED_DATE " & _ "from FINPROD.POP_LINES A1, FINPROD.GOODS_RECEIVED_LINES A2, FINPROD.GOODS_RECEIVED_HEADERS " & _ "WHERE A1.PART_CODE = sq(txtBox1.text) " & _ "AND A1.PO_NUMBER = A2.PO_NUMBER " & _ "AND A1.PO_LINE_NUMBER = A2.PO_LINE_NUMBER " & _ "AND A2.GRN_NUMBER = A3.GRN_NUMBER " & _ "ORDER BY A3.RECEIVED_DATE"

    silver-gray

    G S 2 Replies Last reply
    0
    • S Silver Grey

      I am getting an invalid column error from oracle from the following code: I checked the columns and they are ok, any ideas ??? "Select A1.PART_CODE, A1.PO_NUMBER, A1.PO_LINE_NUMBER, A3.RECEIVED_DATE " & _ "from FINPROD.POP_LINES A1, FINPROD.GOODS_RECEIVED_LINES A2, FINPROD.GOODS_RECEIVED_HEADERS " & _ "WHERE A1.PART_CODE = sq(txtBox1.text) " & _ "AND A1.PO_NUMBER = A2.PO_NUMBER " & _ "AND A1.PO_LINE_NUMBER = A2.PO_LINE_NUMBER " & _ "AND A2.GRN_NUMBER = A3.GRN_NUMBER " & _ "ORDER BY A3.RECEIVED_DATE"

      silver-gray

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      The database is not aware of your text fields. You have to put the value from the text field in the query, not the name of the text field.

      --- b { font-weight: normal; }

      1 Reply Last reply
      0
      • S Silver Grey

        I am getting an invalid column error from oracle from the following code: I checked the columns and they are ok, any ideas ??? "Select A1.PART_CODE, A1.PO_NUMBER, A1.PO_LINE_NUMBER, A3.RECEIVED_DATE " & _ "from FINPROD.POP_LINES A1, FINPROD.GOODS_RECEIVED_LINES A2, FINPROD.GOODS_RECEIVED_HEADERS " & _ "WHERE A1.PART_CODE = sq(txtBox1.text) " & _ "AND A1.PO_NUMBER = A2.PO_NUMBER " & _ "AND A1.PO_LINE_NUMBER = A2.PO_LINE_NUMBER " & _ "AND A2.GRN_NUMBER = A3.GRN_NUMBER " & _ "ORDER BY A3.RECEIVED_DATE"

        silver-gray

        S Offline
        S Offline
        Silver Grey
        wrote on last edited by
        #3

        There are 3 different table involved here. The table A1 will return many rows since it is the purchase order line items table. the other will return one for each of the rows in A1. I don't understand your reply. This is a select command were the data in txtBNox1.text is the only field that has enterable data in. Please explain your reply. Thanks

        silver-gray

        S 1 Reply Last reply
        0
        • S Silver Grey

          There are 3 different table involved here. The table A1 will return many rows since it is the purchase order line items table. the other will return one for each of the rows in A1. I don't understand your reply. This is a select command were the data in txtBNox1.text is the only field that has enterable data in. Please explain your reply. Thanks

          silver-gray

          S Offline
          S Offline
          Silver Grey
          wrote on last edited by
          #4

          The text is converted via the following function Public Function SQ(ByVal Textin As String) As String SQ = "'" & Replace(Textin, "'", "''") & "'" End Function

          silver-gray

          G 1 Reply Last reply
          0
          • S Silver Grey

            The text is converted via the following function Public Function SQ(ByVal Textin As String) As String SQ = "'" & Replace(Textin, "'", "''") & "'" End Function

            silver-gray

            G Offline
            G Offline
            Guffa
            wrote on last edited by
            #5

            The database is not aware of your function either. You have placed the function call and the reference to the text box inside the string, that means that it's not code, it's just a part of the string. The string will be sent just as it is to the database, and the database couldn't do anything with it even if it did understand what it was, as it doesn't have access to either your function or your text box.

            --- b { font-weight: normal; }

            S 1 Reply Last reply
            0
            • G Guffa

              The database is not aware of your function either. You have placed the function call and the reference to the text box inside the string, that means that it's not code, it's just a part of the string. The string will be sent just as it is to the database, and the database couldn't do anything with it even if it did understand what it was, as it doesn't have access to either your function or your text box.

              --- b { font-weight: normal; }

              S Offline
              S Offline
              Silver Grey
              wrote on last edited by
              #6

              Thank you. Now I understand Thanks :laugh:

              silver-gray

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups