- Notifications
You must be signed in to change notification settings - Fork33
Description
Hi,
Is there a way to configure the ODBC driver to use the extended protocol when running a parameterized query?
Let's assume the following Python client.
import pyodbc
def connect_to_odbc(uri):
conn = pyodbc.connect(uri)
return conndef execute_query(conn, query):
cursor = conn.cursor()
cursor.execute(query, 1)
result = cursor.fetchall()
return resulturi = 'DSN=MyDSN'
conn = connect_to_odbc(uri)
query = 'SELECT * from mytable where id = ?'result = execute_query(conn, query)
for row in result:
print(row)conn.close()
If the DSN is configured with 'server side prepare' option set to 1 (and also batch size is set to 1):
- I expected that the driver would send P/B/E messages.
- However, what I'm observing is that the driver only sends a Q message, with the parameter already replaced.
Could you confirm if this is the expected behaviour?
Is there anything that I can configure in the driver in order to get the behaviour that I was expecting?
Regards