Home arrow static arrow Java Programming [Archive] - delete row from access table
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - delete row from access table
This topic has 1 reply on 1 page.

Posts:2
Registered: 7/26/04
delete row from access table  
Jul 26, 2004 3:04 PM



 
hello guys i don't know what to do i got the following code

while(rs.next()) {
if(rs.getString().equals(String)) {
rs.deleteRow();
}
}

it does delete some rows and after a while it gives me an InvalidCursorPosition exception
can smb. help me out with this problem?
thx
 

Posts:8,813
Registered: 10/4/00
Re: delete row from access table  
Jul 26, 2004 3:18 PM (reply 1 of 1)



 
1. I bet that isn't the code you are executing
2. I would think about a separate call (DELETE FROM MyTable WHERE SomeField='Something')
3. Maybe deleting the last record in the resultset causes problems
4. Try putting in debugging statements (if (rs.isAfterLast()) System.out.println("AfterLast");)
 
This topic has 1 reply on 1 page.