WilliamRen / django-pyodbc

Automatically exported from code.google.com/p/django-pyodbc
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

All SQL queries get sent twice to the RDBMS, the first one is wrapped by SET FMTONLY ON ; .. ; SET FMTONLY OFF clauses #16

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Set up th SQL server Profiler to be able to see the SQL queries
performed by Django + django-pyodbc (filter them by IP address, username, etc.)
2. Execute an app or test case
3. Watch the queries profiler display

What is the expected output? What do you see instead?

The profiler shows every SQL query is nested inside a
SET FMTONLY ON; ... ; SET FMTONLY OFF 

We ned to investigate how to turn this off if at all possible.

Users of SQLAlchemy mssql dialect pyodbc connector seems to be also
experiencing the same:

http://groups.google.com/group/sqlalchemy/browse_thread/thread/72d2c6e3e48f784/d
f8bb7e720cc7cf0?lnk=gst#df8bb7e720cc7cf0

and this page is also linked from the thread:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=570896&SiteID=1

Original issue reported on code.google.com by cra...@gmail.com on 6 Sep 2008 at 11:35

GoogleCodeExporter commented 8 years ago
http://support.microsoft.com/kb/836830/en-us

Since it seems to be an MDAC thing it might be rooted in FreeTDS.

Original comment by prosper....@gmail.com on 10 Sep 2008 at 9:39

GoogleCodeExporter commented 8 years ago
Made the summary more accurate.

Original comment by cra...@gmail.com on 5 Dec 2008 at 10:49