Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by U. Fiege on Jun 27, 2007 08:21
open dhtmlx forum
MS SQL Server support in dhtmlxGrid

Dear support team.

I am currently planning the migration from a another 3'rd party grid to dhtmlxGrid in ASP:NET.
We use PostGreSQL & MS SQL Server as database servers.
With PostgreSQL we have no problems using the SmartRendering feature.
I managed this by Loading the rows with Limit x, Offset y .
Unfortunateley the MS SQLServer(2000) desn't offer something like the offset command.
On a table with 200k Rows this is a problem. The DB server has to transfer all records from DB server to the client (Webserver) on each request.
This might not be a soo good solution. [Especially if 5 users do that at the same time]
What is the suggested way for scenrios like that ? (Or aren't thy supported by dhtmlxGrid ?)

Thanks,

U.
Answer posted on Jun 27, 2007 15:43
This doesn't directly related to dhtmlxGrid itself, the component is fully client side and doesn't depend on server side structure.

While MSSQL doesn't support LIMIT command, you still can solve it fully on DB server by using more complex SQL requests or  stored procedures

http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=850&lngWId=5
http://www.davidgagne.net/?p=6051
Answer posted by chienhoang@yahoo.com on Jul 09, 2007 05:45

Hi U.,
The following query should be used to get the same result with LIMIT and Offset in MySQL
--------------------------------------------------------------------------------------------
SELECT * FROM (
SELECT TOP x * FROM (
SELECT TOP y fields
FROM table
WHERE conditions
ORDER BY table.field  ASC) as tbl1
ORDER by field DESC) as tbl2
ORDER by field ASC

x is the number of rows you want returned and y is x+offset.
--------------------------------------------------------------------------------------------
I got the same issue but it's ok now. I tested it with >50,000 records and it's still ok.

 

Answer posted by radyno (Support) on Nov 30, 2014 02:41

To find more precise comments upon this issue, we can offer you read about javascript charts and mvc calendar.