* Some small syntax and refactoring tweaks for asset and inventory MSSQL
* This means the MSSQL db plugin now requires SQL Server 2005
This commit is contained in:
Justin Clarke Casey
2009-03-09 18:04:23 +00:00
parent 5a6bc26600
commit ee73d72f1d
3 changed files with 45 additions and 43 deletions

View File

@@ -258,7 +258,7 @@ namespace OpenSim.Data.MSSQL
{
List<AssetMetadata> retList = new List<AssetMetadata>(count);
using (AutoClosingSqlCommand command = database.Query("SELECT name,description,assetType,temporary,id FROM assets LIMIT @start, @count"))
using (AutoClosingSqlCommand command = database.Query("SELECT (name,description,assetType,temporary,id), Row = ROW_NUMBER() OVER (ORDER BY (some column to order by)) WHERE Row >= @Start AND Row < @Start + @Count"))
{
command.Parameters.Add(database.CreateParameter("start", start));
command.Parameters.Add(database.CreateParameter("count", count));