Monday 22 July 2019

How to get last updated or modified Stored Procedure/Tables/Functions,

I have found below script that's give detailed information about last altered sp/function /tables---

For Stored Procedure -- 

SELECT * FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_TYPE = N'PROCEDURE' and ROUTINE_SCHEMA = N'dbo'

order by  LAST_ALTERED desc


For Functions-- 


SELECT * FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_TYPE = N'FUNCTION' and ROUTINE_SCHEMA = N'dbo'
order by  LAST_ALTERED desc


For Tables- 

SELECT name, [modify_date]  FROM sys.tables order by  [modify_date] desc

Alternate Script for  for last modified sp within few days--

SELECT name, modify_date, create_date,*
FROM sys.objects
WHERE type = 'P'

AND DATEDIFF(D,modify_date, GETDATE())<2




I have above query will help you to identify last updated 

What is the localStorage in JavaScript?


Window localStorage Property in JavaScript-

The localStorage and sessionStorage properties allow to save key/value pairs in a web browser.
The localStorage object stores data with no expiration date. The data will not be deleted when the browser is closed, and will be available the next day, week, or year.
The localStorage property is read-only.
In  sessionStorage property which stores data for one session (data is lost when the browser tab is closed).
Syntax-
window.localStorage
Syntax for SAVING data to localStorage:
localStorage.setItem("key", "value");
Syntax for READING data from localStorage:
var lastname = localStorage.getItem("key");
Syntax for REMOVING data from localStorage:
localStorage.removeItem("key");

Can we have more than on global.asax file? What is the use of Global.asax page?

No, We can not have more than one global.asax file in an application.


What is Global.asax file: global.asax allows us to write event handlers that react to global events in web applications.
How it gets called: Global.asax files are never called directly by the user, rather they are called automatically in response to application events.
Point to remember about global.asax:
·         They do not contain any HTML or ASP.NET tags.
·         Contain methods with specific predefined names.
·         They defined methods for a single class, application class.
·         They are optional, but a web application has no more than one global.asax file.