Results 1 to 4 of 4
- 04-08-2010, 08:25 PM #1
java.sql.SQLSyntaxErrorException: ORA-00971: missing SET keyword
Please help on this :confused:
i am receiving such an error
[COLOR="Red"]java.sql.SQLSyntaxErrorException: ORA-00971: missing SET keyword
my code is ::
i am getting error directed to the colored portion of my code..Java Code:if (column == 1) { preparedStatement = connection.prepareStatement("update rms_accountstore customer_name = ? where customer_name like ?"); preparedStatement.setString(1, data.toString()); preparedStatement.setString(2, resultset.getObject(column + 1).toString()); [COLOR="red"]preparedStatement.executeUpdate();[/COLOR] } else if (column == 2) { preparedStatement = connection.prepareStatement("update rms_accountstore customer_address = ? where customer_address like ?"); preparedStatement.setString(1, data.toString()); preparedStatement.setString(2, resultset.getObject(column + 1).toString()); preparedStatement.executeUpdate(); } else if (column == 3) { preparedStatement = connection.prepareStatement("update rms_accountstore tin_number = ? where tin_number like ?"); preparedStatement.setString(1, data.toString()); preparedStatement.setString(2, resultset.getObject(column + 1).toString()); preparedStatement.executeUpdate(); }
plz suggest. thnxLast edited by Stephen Douglas; 04-08-2010 at 08:29 PM.
The Quieter you become the more you are able to hear !
- 04-08-2010, 08:45 PM #2
Senior Member
- Join Date
- Mar 2009
- Posts
- 105
- Rep Power
- 0
I think your update syntax is incorrect. This is how an update needs to work:
UPDATE <table> SET foo=bar, foo2=bar2 WHERE <conditions>;
Yours is missing "set":
Java Code:preparedStatement = connection.prepareStatement("update rms_accountstore [b]set[/b] customer_name = ? where customer_name like ?");
- 04-08-2010, 08:47 PM #3
Ooooh such a stupid mistake.. i have been looking for the mistake elsewhere for so long.. thank you !
The Quieter you become the more you are able to hear !
- 04-08-2010, 08:48 PM #4
Senior Member
- Join Date
- Mar 2009
- Posts
- 105
- Rep Power
- 0
Similar Threads
-
java.sql.SQLException: Missing IN or OUT parameter at index:: 1
By Stephen Douglas in forum New To JavaReplies: 2Last Post: 04-08-2010, 08:45 PM -
[SOLVED] Eclipse-Run As "Java application" missing!!
By Triji in forum EclipseReplies: 5Last Post: 01-27-2009, 03:49 PM -
Missing 4 ISO 3166-1 codes in java.util.Locale
By fkeller in forum Advanced JavaReplies: 1Last Post: 01-16-2009, 05:41 PM -
missing required java project: org.eclipse.swt
By phubaba in forum EclipseReplies: 1Last Post: 12-15-2008, 08:11 PM -
Telnet with java missing sign in response
By chlebik in forum NetworkingReplies: 0Last Post: 11-11-2008, 12:13 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks