Home » Infrastructure » Windows » ORA-03001 error
icon2.gif  ORA-03001 error [message #332669] Wed, 09 July 2008 06:01 Go to next message
varun_mca_ju
Messages: 2
Registered: July 2008
Junior Member
I have a textbox called "txtPurpose" in a C# Windows Application, and i want that the text entered by the user in the textbox should be added to the "PURPOSE" field in a table "TABLE2_HDB1" in Oracle database "HDB1" on clicking a "submit" button.
i am passing textbox value to function Insert like
Insert(txtPurpose.Text);


private bool Insert(string field)
{
bool success = false;


string constr = "Provider=MSDAORA;Data Source=HDb1;User Id=myUsername;Password=****;";
OleDbConnection con = new OleDbConnection(constr);
try
{ con.Open();
OleDbCommand sc = new OleDbCommand("insert into TABLE2_HDB1 (PURPOSE) values '" + field + "'", con);
sc.CommandType = CommandType.Text;
if (sc.ExecuteNonQuery() > 0) success = true;
}
catch (OleDbException sq)
{
MessageBox.Show("Error : " + sq.Message);
}
finally
{
if (con.State != ConnectionState.Closed) { con.Close(); }
con.Dispose();
}
return success;
}
on running this code i get the error ORA-03001:unimplemented feature....plz help Sad
Re: ORA-03001 error [message #332682 is a reply to message #332669] Wed, 09 July 2008 06:30 Go to previous messageGo to next message
tahpush
Messages: 961
Registered: August 2006
Location: Stockholm/Sweden
Senior Member

Read the OraFAQ Forum Guide before posting.

Quote:
ORA-03001: unimplemented feature
Cause: This feature is not implemented.
Action: None.


Re: ORA-03001 error [message #332685 is a reply to message #332669] Wed, 09 July 2008 06:34 Go to previous messageGo to next message
Michel Cadot
Messages: 58599
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Print the command before executing it and post it.
I bet you have a not correct statement.

Regards
Michel
icon4.gif  ORA-00936:missing expression [message #333972 is a reply to message #332685] Tue, 15 July 2008 01:40 Go to previous messageGo to next message
varun_mca_ju
Messages: 2
Registered: July 2008
Junior Member
thanks for the help Talpush and Michel....i am now using a different code and having the following problrm....

I have a textbox called "txtPurpose" in a C# Windows Application, and i want that the text entered by the user in the textbox should be added to the "PURPOSE" field in a table "TABLE2_HDB1" in Oracle database "HDB1" on clicking a "submit" button.
the coding for the submit button is as follows :-

private void button1_Click(object sender, EventArgs e)
{
string OracleStmt;
string ConString;
OleDbConnection cn = null;
OleDbCommand cmd = null;
try
{
OracleStmt = "insert into TABLE2_HDB1(PURPOSE) values(@PURPOSE)";
ConString = " Provider=MSDAORA;Data Source=HDb1;User Id=SYSTEM ;Password=*****;";
cn = new OleDbConnection(ConString);
cmd = new OleDbCommand(OracleStmt, cn);

cmd.Parameters.Add(new OleDbParameter("@PURPOSE", OleDbType.VarChar , 20));
cmd.Parameters["@PURPOSE"].Value = txtPurpose.Text;
cn.Open();

cmd.ExecuteNonQuery();
textBox8 .Text = "record inserted successfully";
}
catch (Exception ex)
{
textBox8 .Text = ex.Message;
}
finally
{
cn.Close();
}
}

on executing the code i am getting the error :-
ORA-00936:missing expression.
please help.
Re: ORA-00936:missing expression [message #333983 is a reply to message #333972] Tue, 15 July 2008 02:01 Go to previous message
Michel Cadot
Messages: 58599
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Your statement is not correct.
We don't have your statement, we can't say more.
Do as I said: print your statement before sending it to Oracle.

Regards
Michel
Previous Topic: Need help with Installation of Oracle 11g release 1 on Vista Business
Next Topic: Make server send text message or email when service dies?
Goto Forum:
  


Current Time: Mon Jul 28 04:19:44 CDT 2014

Total time taken to generate the page: 0.10845 seconds