Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

You have a Python script where you don’t buffer your query results. The query re

ID: 3912707 • Letter: Y

Question

You have a Python script where you don’t buffer your query results. The query result returns ten rows and you read only the first row and then close the cursor. What kind of error will you get?

a

Should not get an error.

b

Syntax error

c

Buffer underflow exception

d

Internal error

Question 10 (1 point)

To control for an InternalError exception you should use a(n) __________ connection.

a

Unbuffered

b

Buffered

c

Secure

d

Open

a

Should not get an error.

b

Syntax error

c

Buffer underflow exception

d

Internal error

Explanation / Answer

Answers:

d. Internal error

You will encounter error similar to "InternalError: Unread result found". So, result returned by the unbuffered cursor needs to be fully consumed before you can execute another query or close it.

Question 10

b. Buffered

For queries executed using a buffered cursor, row-fetching methods such as fetchone(), fetchall() return rows from the set of buffered rows.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote