but it is not updating ...and i cant figure out why...is there is any problem with connection (con) or statement (stmtA)?
David Harkness
Ranch Hand
Joined: Aug 07, 2003
Posts: 1646
posted
0
I usually avoid "select *" since the order of the columns returned can change. For example, if you create a table with three rows (A, B, D) in the database but later insert a new third column (A, B, C, D), using "select *" in most databases will return them as (A, B, D, C). Does this work against some databases (created new after adding a column) and not others (created earlier and altered in-place)?
In any case, java.util.Date.parse(String) was deprecated in JDK 1.1. Use SimpleDateFormat with the parse format that you expect.
Finally, please explain what "it is not updating" means specifically: compile error (unlikely but possible), exception, wrong value in database, or "nothing happens"?
bijoy bose
Ranch Hand
Joined: Mar 27, 2004
Posts: 32
posted
0
i am getting an SQL exception if i delete any row by using DeleteRow() method of ResultSet class. exception is: "Invalid Cursor State". But the code is actulally doing the work i.e is deleting the row from DB
bijoy bose
Ranch Hand
Joined: Mar 27, 2004
Posts: 32
posted
0
i am sorry i am supposed to say somthing on ypdating problem....just ignore the other question!!
the problem is i am trying to update a date column in a specific row...so when i am trying to set a date in a specific column in a specific row, i am using UpdateLong(columnindex, date). method of resultset class it is not updating. i mean nothing is changed in the actuall DB
Carol Enderlin
drifter
Ranch Hand
Joined: Oct 10, 2000
Posts: 1348
posted
0
Maybe I'm missing something...
If you are using ResultSet.getDate() why aren't you using ResultSet.updateDate()?
Seems that Ernest's moving to the JDBC forum didn't work. Trying again...
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
bijoy bose
Ranch Hand
Joined: Mar 27, 2004
Posts: 32
posted
0
Thanks Carol...though i have tried UpdateDate() method earlier but i was sending instance of util.date thats y i was getting an error but now i got it!