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. Web Development
  3. ASP.NET
  4. ERROR [42000] [Microsoft][ODBC driver for Oracle][Oracle]ORA-00936: missing expression [modified]

ERROR [42000] [Microsoft][ODBC driver for Oracle][Oracle]ORA-00936: missing expression [modified]

Scheduled Pinned Locked Moved ASP.NET
htmloraclesysadmintoolshelp
8 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.
  • I Offline
    I Offline
    idsanjeevjha
    wrote on last edited by
    #1

    using vb my problems in insertion ERROR [42000] [Microsoft][ODBC driver for Oracle][Oracle]ORA-00936: missing expression my code is

    <%@ import Namespace="System.Data.ODbc" %>
    <%@ Import Namespace=" System.Data"%>
    <script runat="server">

    Sub submit(sender As Object, e As EventArgs)
    dim dbconn
    dbconn=New ODbcConnection("dsn=oracle;uid=starter;pwd=starter;")
    dbconn.Open()
    dim isql,idbread,idbcomm
    isql="Insert Into students(id,first\_name,last\_name,major) values (@fname,@id,@lname,@major)"
    idbcomm=new odbccommand(isql,dbconn)
    idbcomm.Parameters.Add( "@fname",fname.text)
    idbcomm.Parameters.Add( "@id",id.Text)
    idbcomm.Parameters.Add( "@lname",lname.Text)
    idbcomm.Parameters.Add( "@major",major.Text)
    idbcomm.ExecuteNonQuery()
    dbconn.Close()	
    End Sub
    

    </script>
    <html>
    <head>
    </head>
    <body>
    <form runat="server">
    <th>
    Id Number:</th>
    <asp:TextBox id="id" runat="server"></asp:TextBox>
    <br />
    <br />
    <th>MaJor:</th>
    <asp:TextBox id="major" runat="server"></asp:TextBox>
    <br />
    <br />
    <th>First Name:</th>
    <asp:TextBox id="fname" runat="server"></asp:TextBox>
    <br />
    <br />
    <th>Last Name:</th>
    <asp:TextBox id="lname" runat="server"></asp:TextBox>
    <br />
    <br />
    <hr />
    <asp:Button id="Button1" onclick="submit" runat="server" Text="Submit"></asp:Button>
    </form>
    </body>
    </html>

    sanjeev

    modified on Saturday, June 28, 2008 2:04 AM

    C 1 Reply Last reply
    0
    • I idsanjeevjha

      using vb my problems in insertion ERROR [42000] [Microsoft][ODBC driver for Oracle][Oracle]ORA-00936: missing expression my code is

      <%@ import Namespace="System.Data.ODbc" %>
      <%@ Import Namespace=" System.Data"%>
      <script runat="server">

      Sub submit(sender As Object, e As EventArgs)
      dim dbconn
      dbconn=New ODbcConnection("dsn=oracle;uid=starter;pwd=starter;")
      dbconn.Open()
      dim isql,idbread,idbcomm
      isql="Insert Into students(id,first\_name,last\_name,major) values (@fname,@id,@lname,@major)"
      idbcomm=new odbccommand(isql,dbconn)
      idbcomm.Parameters.Add( "@fname",fname.text)
      idbcomm.Parameters.Add( "@id",id.Text)
      idbcomm.Parameters.Add( "@lname",lname.Text)
      idbcomm.Parameters.Add( "@major",major.Text)
      idbcomm.ExecuteNonQuery()
      dbconn.Close()	
      End Sub
      

      </script>
      <html>
      <head>
      </head>
      <body>
      <form runat="server">
      <th>
      Id Number:</th>
      <asp:TextBox id="id" runat="server"></asp:TextBox>
      <br />
      <br />
      <th>MaJor:</th>
      <asp:TextBox id="major" runat="server"></asp:TextBox>
      <br />
      <br />
      <th>First Name:</th>
      <asp:TextBox id="fname" runat="server"></asp:TextBox>
      <br />
      <br />
      <th>Last Name:</th>
      <asp:TextBox id="lname" runat="server"></asp:TextBox>
      <br />
      <br />
      <hr />
      <asp:Button id="Button1" onclick="submit" runat="server" Text="Submit"></asp:Button>
      </form>
      </body>
      </html>

      sanjeev

      modified on Saturday, June 28, 2008 2:04 AM

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Which line gives you the error ?

      Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

      I 1 Reply Last reply
      0
      • C Christian Graus

        Which line gives you the error ?

        Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

        I Offline
        I Offline
        idsanjeevjha
        wrote on last edited by
        #3

        line no not given

        sanjeev

        C 1 Reply Last reply
        0
        • I idsanjeevjha

          line no not given

          sanjeev

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          Well, I never put code in the aspx ( what a disaster ), but I'm sure you can set a breakpoint with F9 and step through the code to see which line causes the problem.

          Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

          I 1 Reply Last reply
          0
          • C Christian Graus

            Well, I never put code in the aspx ( what a disaster ), but I'm sure you can set a breakpoint with F9 and step through the code to see which line causes the problem.

            Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

            I Offline
            I Offline
            idsanjeevjha
            wrote on last edited by
            #5

            i have modified my code with only insertion parts

            sanjeev

            C 1 Reply Last reply
            0
            • I idsanjeevjha

              i have modified my code with only insertion parts

              sanjeev

              C Offline
              C Offline
              Christian Graus
              wrote on last edited by
              #6

              You don't want me to try to help you then ? I need to know what line causes the error to try to guess what the problem is.

              Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

              I 1 Reply Last reply
              0
              • C Christian Graus

                You don't want me to try to help you then ? I need to know what line causes the error to try to guess what the problem is.

                Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

                I Offline
                I Offline
                idsanjeevjha
                wrote on last edited by
                #7

                EXACTLY I HAVE NOT A LINE NUMBER BUT ERROR IN THIS PART

                isql="Insert Into students(id,first_name,last_name,major) values (@fname,@id,@lname,@major)" idbcomm=new odbccommand(isql,dbconn) idbcomm.Parameters.Add( "@fname",fname.text) idbcomm.Parameters.Add( "@id",id.Text) idbcomm.Parameters.Add( "@lname",lname.Text) idbcomm.Parameters.Add( "@major",major.Text) idbcomm.ExecuteNonQuery()

                sanjeev

                I 1 Reply Last reply
                0
                • I idsanjeevjha

                  EXACTLY I HAVE NOT A LINE NUMBER BUT ERROR IN THIS PART

                  isql="Insert Into students(id,first_name,last_name,major) values (@fname,@id,@lname,@major)" idbcomm=new odbccommand(isql,dbconn) idbcomm.Parameters.Add( "@fname",fname.text) idbcomm.Parameters.Add( "@id",id.Text) idbcomm.Parameters.Add( "@lname",lname.Text) idbcomm.Parameters.Add( "@major",major.Text) idbcomm.ExecuteNonQuery()

                  sanjeev

                  I Offline
                  I Offline
                  idsanjeevjha
                  wrote on last edited by
                  #8

                  problems from this part of code

                  isql="Insert Into students(id,first_name,last_name,major) values (@fname,@id,@lname,@major)"
                  idbcomm=new odbccommand(isql,dbconn)
                  idbcomm.Parameters.Add( "@fname",fname.text)
                  idbcomm.Parameters.Add( "@id",id.Text)
                  idbcomm.Parameters.Add( "@lname",lname.Text)
                  idbcomm.Parameters.Add( "@major",major.Text)
                  idbcomm.ExecuteNonQuery()

                  sanjeev

                  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