Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old June 28th, 2008, 12:50 AM
Authorized User
Join Date: Nov 2007
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to sanjeev jha
Default ERROR [42000] [Microsoft][ODBC driver for Oracle][

using vb
my problems in insertion the code part display data is working but insetion part reported error
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,sql,dbcomm,dbread
dbconn=New ODbcConnection("dsn=oracle;uid=starter;pwd=starter;")
sql="SELECT * FROM students"
dbcomm=New ODbcCommand(sql,dbconn)
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)

End Sub

<form runat="server">
Id Number:</th>
<asp:TextBox id="id" runat="server"></asp:TextBox>
<br />
<br />
<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 />

<asp:Repeater id="customers" runat="server">
<table border="1" width="50%">
<tr bgcolor="#2D80DB">
First Name</td>
Last Name</td>
<tr bgcolor="#C1C8D2">
<tr bgcolor="#D1D9CC">
<asp:Button id="Button1" onclick="submit" runat="server" Text="Submit"></asp:Button>

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Microsoft][ODBC SQL Server Driver] TIME OUT ERROR rtr1900 ASP.NET 2.0 Basics 1 November 12th, 2008 09:36 AM
ODBC Microsoft Access Driver Issue mat41 Classic ASP Professional 5 June 30th, 2008 10:37 AM
[Microsoft][ODBC SQL Driver]Connection is busy [email protected] Pro JSP 0 May 8th, 2006 07:51 AM
[Microsoft][ODBC Microsoft Access Driver] Syntax e chinedu Classic ASP Databases 3 November 18th, 2004 03:48 PM
[ODBC Microsoft Access Driver] !!!Error!!! Varg_88 Classic ASP Databases 3 August 30th, 2004 06:19 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.