Friday, March 9, 2012
How to read the error message #Error.
My custom code i have written try catch end try block and in the catch
section just i returned the err.description. But locally it was working fine.
Once deployed it was not working fine. just showing #error. Any help would
be appreciated.
Regards,
Sri.On Jun 25, 2:36 pm, Sriman <Sri...@.discussions.microsoft.com> wrote:
> Hi,
> My custom code i have written try catch end try block and in the catch
> section just i returned the err.description. But locally it was working fine.
> Once deployed it was not working fine. just showing #error. Any help would
> be appreciated.
> Regards,
> Sri.
This is a long shot, but you could try checking the Event Viewer:
Application Errors log -or- you could try adjusting the Custom Errors
section of the Reports or ReportServer virtual directories (via: Right-
click -> Properties -> Custom Errors tab) -or- add custom code to the
report (via: Layout view -> Report drop-down -> Report Properties... -
> Code). Sorry that I could not be of greater assistance.
Regards,
Enrique Martinez
Sr. Software Consultant
Wednesday, March 7, 2012
How to read block of rows from database tables
Is there are any option/query to read block of rows at one time and then query again for next page ?
i.e In MYSQL have LIMIT clause with Select Statement
Please let me know..
Database : SQL Server 2000/2005,
Thanks in Advance
Laxmilal
Whenever you use Select statement you must use WHERE condition to limit the rows.
Eg.
Select col1,col2.... From Tablename WHERE someid between 1 and 1000
Madhu
|||You 'Machine not responding' is most likely due to waiting for millions of rows to come back from the server.
You really need to limit the quantity of data that you are requesting from SQL Server. Without WHERE clause criteria that enforces limits, you are unnecessarily wasting bandwidth (and time) as more data than you need for the operation at hand is being transported to the client application.
With SQL 2005, you may wish to explore using the new ROW_NUMBER() function to assist in retrieving specific 'blocks' of rows.
Referring to Books Online, Topic: ROW_NUMBER()
Example:
USE AdventureWorks; GOWITH OrderedOrders AS ( SELECT SalesOrderID, OrderDate, ROW_NUMBER() OVER (ORDER BY OrderDate) AS 'RowNumber' FROM Sales.SalesOrderHeader ) SELECT * FROM OrderedOrders WHERE RowNumber BETWEEN 50 AND 60;(You should be able to adapt this concept for your needs.)