sql server - framework 4 - IIS 7 weird sort from db to page
Posted
by
ila
on Stack Overflow
See other posts from Stack Overflow
or by ila
Published on 2011-01-04T11:37:09Z
Indexed on
2011/01/04
14:53 UTC
Read the original article
Hit count: 220
I am experiencing a strange behavior when reading a resultset from database in a calling method. The sort of the rows is different from what the database should return.
My farm:
- database server: sql server 2008 on a WinServer 2008 64 bit
- web server: a couple of load balanced WinServer 2008 64 bit running IIS 7
The application runs on a v4.0 app pool, set to enable 32bit applications
Here's a description of the problem:
- a stored procedure is called, that returns a resultset sorted on a particular column
- I can see thru profiler the call to the SP, if I run the statement I see correct sorting
- the calling page gets the results, and before any further elaboration logs the rows immediately after the SP execution
- the results are in a completely different order (I cannot even understand if they are sorted in any way)
Some details on the Stored Procedure:
- it is called by code using a SqlDatAdapter
- it has also an output value (a count of the rows) that is read correctly
- which sort field is to be used is passed as a parameter
- makes use of temp tables to collect data and perform the desired sort
Any idea on what I could check? Same code and same database work correctly in a test environment, 32 bit and not load balanced.
© Stack Overflow or respective owner