List all stored procedure created / modified in N days

Jun 28, 2010 Posted by Lara Kannan 0 comments
Following script will provide name of all the stored procedure which were CREATED in last 7 days, they may or may not be modified after that.

SELECT name
FROM sys.objects
WHERE type = 'P'
AND DATEDIFF(D,create_date, GETDATE()) < 7
----Change 7 to any other day value.

Following script will provide name of all the stored procedure which were MODIFIED in last 7 days, they may or may not be modified after that.

SELECT name
FROM sys.objects
WHERE type = 'P'
AND DATEDIFF(D,modify_date, GETDATE()) < 7
----Change 7 to any other day value

Source : http://blog.sqlauthority.com/

Hope this script will help you.

Share

'HttpUtility' is not a member of 'Web' in console application VS2010.

Jun 18, 2010 Posted by Lara Kannan 1 comments
Today I started my first console application developmentin VS 2010.

After I added the below code
System.Web.HttpUtility.UrlEncode(item)

and build the application, the system throws the error message like
Error message: 'HttpUtility' is not a member of 'Web'.

This error message suggests to add a reference to System.Web. When I look into it over the reference list, its was not there. I only have "System.Web.ApplicationServices" and "System.Web.Services". I dont know why its not there in the list?

Then my friend said, 'target framework may be different'. After that I checked the target framework, its was .NET Framework 4 Client Profile. Then I changed it as .NET Framework 4. Now my code works fine.

Hope this ll help you.

Share

jQuery UI Date Picker control issue with .Net

Jun 10, 2010 Posted by Lara Kannan 0 comments
I build .net applications that require date entry, so I implement the Date Picker control often. Unfortunately, there is a problem when it is used on a field that is validated using a .Net validation control.

Upon clicking on a date, I get the following error:
length is null or not an object
This only occurs when using Internet Explorer. Currently, my only solution is to edit the source code.

Locate the following code in jquery-ui.js or ui.datepicker.js:
inst.input.trigger('change')

Replace it with:
if (!$.browser.msie){inst.input.trigger('change')}

This prevents the change event firing in IE.


Thanks : AndrewRowland
Share
Labels: ,

How to use the Web.Config entry into GridView control in asp

Posted by Lara Kannan 1 comments
How to use the Web.Config entry into GridView control in asp.net?

Put your data into the appSettings section of your web.config:

For en example, if you need the PageSize value for gridview then

<appSettings>
<add key="MyPageSize" value="25"/>
</appSettings>

Use this web.config value into gridview by using below method.

<asp:GridView
ID="GridView"
runat="Server"
PageSize="<%$ AppSettings:MyPageSize % >"
>
</asp:GridView>

Hope this will help you.
Share
Labels: ,