473,407 Members | 2,676 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

One or more errors occurred during processing of commandORA-00971missing SET keyword

i am pasting the code in which i am finding the error
this is happening when i click on the update button of the datagrid which is fired when i click the edit button


public void BindData()
{
OleDbDataAdapter da = new OleDbDataAdapter("SELECT *FROM CMRS_BUSINESSAREA_MASTER","Provider=MSDAORA.1;User ID=meter_reading;Password=colony;Data Source=windev;OLEDB.NET=true;" );
DataSet ds = new DataSet();
da.Fill(ds);

DataGrid1.DataSource = ds.Tables[0].DefaultView ;
DataGrid1.DataBind();


}
public void Edit_DataGrid1(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
// We use CommandEventArgs e to get the row which is being clicked
// This also changes the DataGrid labels into Textboxes so user can edit them
DataGrid1.EditItemIndex = e.Item.ItemIndex;
// Always bind the data so the datagrid can be displayed.
BindData();
}
public void Cancel_DataGrid1(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
// All we do in the cancel method is to assign '-1' to the datagrid editItemIndex
// Once the edititemindex is set to '-1' the datagrid returns back to its original condition
DataGrid1.EditItemIndex = -1;
BindData();
}
public void Update_DataGrid1(object source,System.Web.UI.WebControls.DataGridCommandEv entArgs e)
{
//try
//{

string str = ConfigurationSettings.AppSettings["ConnectionString"].ToString();
OleDbConnection con1 = new OleDbConnection();
con1.ConnectionString = str;


TextBox txtAREADESCRIPTION =(TextBox) e.Item.Cells[1].Controls[0];
string strUpdateStmt;

strUpdateStmt = "UPDATE CMRS_BUSINESSAREA_MASTER SET" + "CBM_BUSAREA_DESC = '" + txtAREADESCRIPTION.Text + "' " + "WHERE CBM_BUSAREA_CODE = " + e.Item.Cells[0].Text;
Response.Write("strUpdateStmt");
cmd = new OleDbCommand(strUpdateStmt,con1);
con1.Open();
cmd.ExecuteNonQuery();
DataGrid1.EditItemIndex = -1;
BindData();
}
//catch(Exception e)
//{
// Console.WriteLine(e.Message.ToString());
//}
//}


#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.cmd = new System.Data.OleDb.OleDbCommand();
this.con1 = new System.Data.OleDb.OleDbConnection();
this.addbtn.Click += new System.EventHandler(this.addbtn_Click);
this.updtbtn.Click += new System.EventHandler(this.updtbtn_Click);
this.delbtn.Click += new System.EventHandler(this.delbtn_Click);

this.Load += new System.EventHandler(this.Page_Load);

}
#endregion

private void addbtn_Click(object sender, System.EventArgs e)
{
string str = ConfigurationSettings.AppSettings["ConnectionString"].ToString();

OleDbConnection con1 = new OleDbConnection();
con1.ConnectionString = str;
OleDbCommand cmd = new OleDbCommand("Insert into cmrs_businessarea_master values('"+TextBox1.Text+"','"+TextBox2.Text+"')",c on1);
con1.Open();
cmd.ExecuteNonQuery();
con1.Close();
BindData();


}
Jul 24 '07 #1
0 943

Sign in to post your reply or Sign up for a free account.

Similar topics

303
by: mike420 | last post by:
In the context of LATEX, some Pythonista asked what the big successes of Lisp were. I think there were at least three *big* successes. a. orbitz.com web site uses Lisp for algorithms, etc. b....
1
by: DB_2 | last post by:
Hello, I created the following stored procedure. (Please ignore the logic in it; at this point it is not complete and I am trying to get the basic structure working first.) CREATE PROCEDURE...
3
by: fred bliss | last post by:
Hi All We have a new server running the latest framework, windows server 2003 & IIS 6.0, and we're getting the following error when we try to load the app in IE. Server Error in...
5
by: | last post by:
Unfortunately I've used exception handling as a debugging tool. Now I want to be smarter about handling errors. Today in the global.asx in the Application_OnError event, I inserted code to email...
5
by: genc_ymeri | last post by:
Hi over there, We are a team of 6 developping web applications (ASP.Net/C#/VB.Net/SQLServer). What happens is that randomly, each of us get the below error in (PS). We believe that the "acess is...
8
by: Mark A. Sam | last post by:
Hello I am working locally with Visual Web Developer 2005 Express. Before I even installed it, the information from Microsoft was that you could FTP it to a remote site and it should work. The...
0
by: smkkaleem | last post by:
I am stuck with the error I have posted above in the question title I am developing ASP.NET 2.0 web site and I have added a new rdlc file to my project by using the following process: -Right...
0
by: David Lozzi | last post by:
Howdy, I get the error message as displayed below. I'm using Visual Studio 2003 on WinXP Pro SP2 workstation. I'll be sitting here happily developing when all of a sudden blamo this error will...
0
by: AnalogKid17 | last post by:
<full error> An error has occurred during report processing. Exception has been thrown by the target of an invocation. Login failed for user '\$'. </full error> I have a web based winforms app...
1
by: Willard Farwark | last post by:
DB2 7.2. I do an export each night of important tables. Nothing else should be touching the DB at this time. About every 2 days I get the error below on the same tables most of the time. What...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.