Autoprepare on query
Posted: Wed 28 Apr 2010 19:22
I have a procedure that uses several parameterized queries.
On 49 out of 50 databases, the procedure works.
After working with the one database where the procedure didn't work, I tracked it down to the autoprepare flag on the queries.
In every case, it returned counts of 0, even though the query in mssql manager tool returned data BUT ONLY ON THIS DATABASE. Data is comparable to data in the other databases.
I turned the flag off, and the queries started returning values again.
I can't see any differences in the settings of the database, but I gotta be missing something. Any idea what?
Using
MSSQL Server version 10.00.1798
MSSQL Client version 10.0.1798.0
SDAC version 4.80.0.55
On 49 out of 50 databases, the procedure works.
After working with the one database where the procedure didn't work, I tracked it down to the autoprepare flag on the queries.
In every case, it returned counts of 0, even though the query in mssql manager tool returned data BUT ONLY ON THIS DATABASE. Data is comparable to data in the other databases.
I turned the flag off, and the queries started returning values again.
I can't see any differences in the settings of the database, but I gotta be missing something. Any idea what?
Using
MSSQL Server version 10.00.1798
MSSQL Client version 10.0.1798.0
SDAC version 4.80.0.55