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.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.