Find the error(s) in the following code. This code should modify the age column of table people.

```
1 myResultSet = myStatement.executeQuery(
2 "UPDATE people SET age = 30 WHERE name = 'Bob'" );
```


The error in this code is that the program should be using the executeUpdate
method of the Statement object, not the executeQuery method. The correct code is:

```
1 myStatement.executeUpdate(
2 "UPDATE people SET age = 30 WHERE name = 'Bob'" );
```

Computer Science & Information Technology

You might also like to view...

In a recursive solution to a problem, we solve a problem P(n) by solving another problem P(k) where

a. P(k) is the hardest part of P(n) b. P(k) is a larger problem than P(n) c. P(k) is smaller than P(n) d. P(k) is the same problem as P(n) apart from size.

Computer Science & Information Technology

What is a table? A row? A column?

What will be an ideal response?

Computer Science & Information Technology

Just like an image, charts can be resized using sizing handles

Indicate whether the statement is true or false

Computer Science & Information Technology

What are the two common elements of a complete algorithm?

What will be an ideal response?

Computer Science & Information Technology