• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SQLException ORA-00927: missing equal sign

 
kstalin babu
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here is the code sample....

private void getActionPerformed(java.awt.event.ActionEvent evt) {
try{
query="select ptscno,ptbcrno,ptprno,trunc(to_date(ptprdt,'dd-mm-yyyy')),ptblamt,ptmisamt,ptmisamtcd,ptreconchg from payment where ptprno="+bcrc_prno.getText();
rs=stmt.executeQuery(query);
if(rs.next())
{
bcrc_scno.setText(rs.getString(1));
bcrc_prno.setText(rs.getString(3));
bcrc_bcrcno.setText(rs.getString(2));
bcrc_prdt.setText(rs.getDate(4).toString());
bcrc_billamt.setText(rs.getString(5));
bcrc_misamt.setText(rs.getString(6));
bcrc_misamtcd.setText(rs.getString(7));
bcrc_reconchg.setText(rs.getString(8));
dissable(true); //user defined function to dissable the text fileds
}
else
{
new opendialog(this,"ERROR MESSAGE ...").show();
bcrc_scno.setText("");
bcrc_bcrcno.setText("");
bcrc_prno.setText("");
bcrc_prdt.setText("");
bcrc_billamt.setText("");
bcrc_misamt.setText("");
bcrc_misamtcd.setText("");
bcrc_reconchg.setText("");
bcrc_prno.requestFocus();
dissable(false);
}

}catch(SQLException p){
System.err.print("SQLException :");
System.err.println(p.getMessage());
try{
con.close();
}catch(SQLException e)
{
System.err.print("SQLException :");
System.err.println(e.getMessage());
}
System.exit(2);
}
}


private void updateActionPerformed(java.awt.event.ActionEvent evt) {
try{

if(bcrc_scno.isEditable())
{
rs.updateString(1, bcrc_scno.getText());
rs.updateString(2, bcrc_bcrcno.getText());
rs.updateString(3, bcrc_prno.getText());
String dt=bcrc_prdt.getText();
java.sql.Date myDate = java.sql.Date.valueOf(dt);
rs.updateDate(4, myDate);
rs.updateString(5, bcrc_billamt.getText());

if(!bcrc_misamt.getText().equals(""))
rs.updateString(6,bcrc_misamt.getText());

if(!bcrc_misamtcd.getText().equals(""))
rs.updateString(7,bcrc_misamtcd.getText());

if(!bcrc_reconchg.getText().equals(""))
rs.updateString(8,bcrc_reconchg.getText());

rs.updateRow();

con.commit();
bcrc_scno.setText("");
bcrc_bcrcno.setText("");
bcrc_prno.setText("");
bcrc_prdt.setText("");
bcrc_billamt.setText("");
bcrc_misamt.setText("");
bcrc_misamtcd.setText("");
bcrc_reconchg.setText("");
bcrc_prno.requestFocus();
dissable(false);
}
else
{
new opendialog(this,"ERROR MESSAGE ...").show();
bcrc_scno.setText("");
bcrc_bcrcno.setText("");
bcrc_prno.setText("");
bcrc_prdt.setText("");
bcrc_billamt.setText("");
bcrc_misamt.setText("");
bcrc_misamtcd.setText("");
bcrc_reconchg.setText("");
bcrc_prno.requestFocus();
dissable(false);
}
}catch(SQLException p){
System.err.print("SQLException :");
System.err.println(p.getMessage());
try{
con.close();
}catch(SQLException e)
{
System.err.print("SQLException :");
System.err.println(e.getMessage());
}
System.exit(2);
}
}

the idea is to get the data and update it again

getActionPerformed is executed where get button is clicked that will get the data
and updateActionPerformed is executed when update button is clicked that will update the data

the problem is after i get the data from database and put it on some textfields and change some text and then click update button i am getting this error
SQLException ORA-00927: missing equal sign

i am unable to figure out kindly help.
thanq in advance

stalin.
[ June 16, 2004: Message edited by: Bear Bibeault ]
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please use the code tags to format your code. You can see the 'code' button under the text box when you post a comment.

Where is the error being thrown?
 
kstalin babu
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when i am using rs.updateRow()
i am getting this error
SQLException RA-00927: missing equal sign

stalin.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34860
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Aniruddha Dhar,
Your post was moved to a new topic.
You have a new question so starting a new thread to avoid confusion with the problem from 2004
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic