ERROR [42000] [Microsoft][ODBC driver for Oracle][Oracle]ORA-00936: missing expression [modified]
-
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
-
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
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 )
-
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 )
line no not given
sanjeev
-
line no not given
sanjeev
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 )
-
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 have modified my code with only insertion parts
sanjeev
-
i have modified my code with only insertion parts
sanjeev
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 )
-
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 )
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
-
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
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