aspose file tools*
The moose likes JDBC and the fly likes SQLException  ORA-00927: missing equal sign Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "SQLException  ORA-00927: missing equal sign " Watch "SQLException  ORA-00927: missing equal sign " New topic
Author

SQLException ORA-00927: missing equal sign

kstalin babu
Greenhorn

Joined: May 18, 2004
Posts: 7
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

Joined: Mar 06, 2001
Posts: 13459

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

Joined: May 18, 2004
Posts: 7
when i am using rs.updateRow()
i am getting this error
SQLException RA-00927: missing equal sign

stalin.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29287
    
140

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


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SQLException ORA-00927: missing equal sign
 
Similar Threads
Strange Oracle 9i connection problem
Single Application but Multiple Connection problem
rs.updateRow() not working (..)
Single Application but Multiple Connection problem
Single Application but Multiple Connection problem