Win a copy of Building Blockchain Apps this week in the Cloud/Virtualization forum!

Keshini Weerasuriya

+ Follow
since Jan 08, 2006
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Keshini Weerasuriya

Hi.. Is thr any way of finding the maximum and minimum of an array without using any loops, or if conditions??

13 years ago
Hi.. I'm getting this table from the database which is dynamically updated which has username and a image. I want to add these to another table by clicking on the image tab..

But since all the images are in one form, and since the tables have been dynamically created, when any image is clicked it'll direct to the same jsp page which is given initially..

How can we verify which image has been clicked by the user?
I want to know how i can change the color of a String variable, so that it looks like the say sort of color and font as in the html pages..

Code i tried is as follows..

<br><strong><font color="#FFFFFF" size="5" face="Georgia, Times New Roman, Times, serif">Welcome</font></strong>
<%= name%>

I want the variable name also to get printed in font color="#FFFFFF" size="5" face="Georgia, Times New Roman, Times, serif".. Is this possible?

Tnx in advance
Hey.. I'm trying to save some data to an oracle database. I get the error message saying

SQLException: ORA-00928: missing SELECT keyword

Can u pls suggest what could be wrong with the following code?
Connection conn = null;

conn = DriverManager.getConnection(
"jdbc racle:thin:scott/tiger@localhost:1521 ra");

String name = request.getParameter( "UName" );
String pword = request.getParameter("Pass");

Statement stmt = conn.createStatement();
stmt.executeUpdate("INSERT INTO UserAccount" +
"VALUES('"+name+"', '"+pword+"')");

catch(SQLException e)
out.println("SQLException: " + e.getMessage() + "<BR>");
while((e = e.getNextException()) != null)
out.println(e.getMessage() + "<BR>");
catch(ClassNotFoundException e)
out.println("ClassNotFoundException: " + e.getMessage() + "<BR>");
//Clean up resources, close the connection.
if(conn != null)
catch (Exception ignored) {}
Thanks Martin.. That worked.. :-)
I changed the statement to

String query = "UPDATE Client SET (CliId = '"+id+"', Surname = '"+surname+"', FirstName = '"+firstname+"', Title = '"+Gen+"',NICNo = '"+NIC+"' , Image = '"+image+"',Address = '"+Address+"', TelNo = '"+no+"',Email = '"+mail+"') WHERE CliId = '" +id+ "'";


Now it says
java.sql.SQLException: ORA-00907: missing right parenthesis
No exceptions.. But the new data doesn't get updated
Hi.. I'm trying to save changes and update the record. But this doesn't seem to work. Can anyone help?

st.executeUpdate("UPDATE Client " +
"SET (CliId = '"+id+"', Surname = '"+surname+"', FirstName = '"+firstname+"', Title = '"+Gen+"',NICNo = '"+NIC+"' , Image = '"+image+"',Address = '"+Address+"', TelNo = '"+no+"',Email = '"+mail+"')");
Thanks for the reply..Can u explain a bit further on how to do it??
13 years ago
Hey.. IS there any way to call a pdf file from java swing application. I want to give a user manual for my application in pdf format and wants this document to open when say the user clicks some button in java swing application..

Is this possible? Thanks in advance..
13 years ago
Thanks Mathew.. It works..
st.executeUpdate("UPDATE UserAccount" + " SET password ="+newPass + "WHERE UserName = "+UName);

SQL command not properly ended

Hi.. I can't seem to find the error in the above statement.. Can anyone help?? Pls..
Tnx Mani Ram.. Your method works.........
14 years ago

I'm trying to equal an ID which is taken as user input in an sql staement as below..

int answer = Integer.parseInt(mainMenu.client);
ResultSet rs = st.executeQuery("select * from Client where CliId = answer ");

Give the error, java.sql.SQLException: ORA-00904: invalid column name
Pls help.. Tnx..
14 years ago
Hi.. Is it possible to write a print function to print a java swing GUI form?? Or is there any way that a java swing GUI can be converted to pdf format so that it can be printed??

14 years ago