You are here Support Forums
Search:  
SQL View - Paging not working
Last Post 03 May 2005 06:50 AM by Ed McNeil. 4 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Ed McNeil
New Member
New Member
Posts:3

--
03 May 2005 06:50 AM  

Hi,

I have DNN3.0.13 running and have installed SQLView for DNN3.

Everything appears to work fine with the grid apart from Paging.

The simple query I am running, based on the Northwind Traders database,  is:

SELECT TOP 100 FirstName, LastName, Title
FROM Employees
ORDER BY LastName ASC

I can sort fine and apply/change the CSS but can't get the grid to page.

Something else I've noticed is that the grid does not display more than 9 rows per page even. It does, however, display the correct no of rows for a row setting less or equal to 9.

Any help would be greatly appreciated.

Saaki

PS: Does anyone have an example of how to run a SQL stored procedure using SQLView?

 

Richard Edwards
DNNStuff Founder
Veteran Member
Veteran Member
Posts:1207
Avatar

--
03 May 2005 02:30 PM  
Saaki,

I'll look into that issue you are having. Make sure if you use sorting, that you provide the ORDER BY clause in the separate Order by field and not directly in your SQL query.

In your example, your query should be: SELECT TOP 100 FirstName, LastName, Title FROM Employees
and the order by portion should be LastName ASC. Perhaps this is affecting the paging.


Here's a sample of how to run a stored procedure using SQLView,

GetSiteLog8 [dnn:portalid],'','2005-1-1','2005-12-31'





Richard Edwards
DNNStuff Founder
Did you receive excellent support? Consider leaving a testimonial
Ed McNeil
New Member
New Member
Posts:3

--
03 May 2005 04:17 PM  

Yes, I'm sure the ORDER BY statement goes in the ORDER BY clause and not at the end of the SELECT statement.

 

The other thing I've noticed is that setting the SQL View to numeric paging only returns a value 1. Should return 10 if selecting the TOP 100 and rows per page is set to 10.

Saaki

Richard Edwards
DNNStuff Founder
Veteran Member
Veteran Member
Posts:1207
Avatar

--
03 May 2005 05:49 PM  
Saaki,

The Employees table in my Northwind database only has 9 rows in it, so you will never get more than 9 rows returned :)

Try running against the Customers table. It has 91 records and you'll see the paging works fine. Phew, you had me worried there for a moment.

Richard



Richard Edwards
DNNStuff Founder
Did you receive excellent support? Consider leaving a testimonial
Ed McNeil
New Member
New Member
Posts:3

--
04 May 2005 05:30 AM  

Hi Richard,

I can't tell you how foolish I look now.

Thanks for pointing that out to me & apologies for taking up your time.

Saaki

You are not authorized to post a reply.

Active Forums 4.1
Privacy StatementTerms Of UseCopyright (c) 2004-2012 DNNStuff