PDA

Click to See Complete Forum and Search --> : PrepareStatement and Microsoft Access ...


manova168
May 4th, 2003, 04:26 AM
Is that true the Microsoft doesn't support the prepareStatement functionality? If not, then could anyone tell me what's wrong with my following code that fails to delete records from an Access database.

Thanx.


public void method(String[] key)
{
...
...
try
{
int i;

sql= "DELETE FROM table WHERE key = '?'";
prestmt = conn.prepareStatement(sql);

for(i=0; i<key.length; i++)
{
prestmt.setString(1, key<i>);
prestmt.executeUpdate();
}
}
...
...
}