Posts

SQL Query to Find Column From All Tables within a Database.

Following script will return all the tables containing specific column along with their schema name. USE AdventureWorks GO SELECT t.name AS table_name, SCHEMA_NAME(schema_id) AS schema_name, c.name AS column_name FROM sys.tables AS t INNER JOIN sys.columns c ON t.OBJECT_ID = c.OBJECT_ID WHERE c.name LIKE '%EmployeeID%' ORDER BY schema_name, table_name;

First and Last Day of Week - SQL

Many times you might come across to a situation where you have to find the first and last day of week. Here is the SQL script which can be used to find the first and last day of the week. --Start of Script DECLARE @date datetime -- Will be the date for which you want to have the Start and End of week DECLARE @end_week datetime -- End of week DECLARE @start_week datetime -- Start of week. SET @date = getdate() SET @start_week = DATEADD(d, 1 - DATEPART(dw, @date), @date) SET @end_week = DATEADD(d,6,@start_week ) SELECT @date, @start_week, @end_week --End of Script

Deployment Modes for Reporting Services

Deployment Modes for Reporting Services Report server modes are mutually exclusive. You can switch modes by repurposing an existing report server deployment, but there is no supported approach for migrating content between database types. Native Mode In native mode, a report server is a stand-alone application server that provides all viewing, management, processing, and delivery of reports and report models. This is the default mode for report server instances. You can install a native mode report server that is configured during setup or you can configure it for native mode operations are Setup is finished. SharePoint Integrated Mode In SharePoint integrated mode, a report server must run within a SharePoint server farm. A SharePoint site provides the front-end access to report server content and operations. The report server provides all report processing and rendering. Features that behave differently in SharePoint integrated mode The following features behave differently on a repo...

SharePoint List Web Part Shared by Sub Sites

Recently I had a requirement where a SharePoint list needs to be available for all sub sites created within a site collection. Consider a scenario where in an organization you have multiple departments having SharePoint sub site for each department and they all want to share an ‘Action Items’ list across all sub sites and main site. Requirement is as follows: • ‘Action Items’ list must be available at each sub-site level. • On the main site when a user log in, user should be able to view Action Items assigned to him. Solution: To achieve this we can have a single list created at parent level and the web part of this list can be reused in subsequent sub sites. Thus by doing this we can have all the data stored in the single list, which can be viewed differently in sub site level as per requirement. • Create a custom web part for that list view, this custom web part supports a tool bar so files can be uploaded and maintained in a single library, but viewed and maintained from any site in...

Changing InetPub to different drive - SharePoint

One of the most common configuration inconsistencies found in SharePoint farms is the Web application path, in most scenarios the Web applications are provisioned under the default root path of C:\Inetpub\wwwroot\wss\VirtualDirectories. This is usually the result of oversight during the provisioning process. Windows SharePoint Services 3.0 provides a configuration field that allows administrators to configure the path to the Web application host directory; however, in many cases, this setting is overlooked. Unfortunately, once a Web application has been provisioned, the only reliable method of moving the Web application is to delete and recreate the Web application on the server farm. Windows SharePoint Services 3.0 derives the directory information from the Web server registry setting at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InetStp\PathWWWRoot, this path is subsequently appended with \wss\VirtualDirectories. To ensure Web applications are provisioned on the proper disk volume, modify...

PR1.3 update Nokia N900

I had been waiting for this update since a long time and there had been lot of buzz about this. Yesterday I had upgraded my Nokia N900 software to PR1.3. I have heard that it is now having QT 4.7 runtime inbuilt but didnt got a chance to test the same. Here is my verdict on this software update. I really didnt find any major changes, but it is said that 100+ maemo minor bus had been fixed. You can download it using the Nokia Software Updator. The only visible difference is it certainly have some performance improvement, seems to be very smooth now. Many application like mediabox have now awesome portrait support and they are looking good too. One more noticeable fact is web browser is really smooth now. I love Maemo and Nokia N900 and looking forward to have some more applications to be developed for N900. I will be trying to port Meego 1.1 image on my Nokia N900. Will keep you posted on the same.

Postback not working in Sharepoint Web Part after GridView Excel Export

Recently I had been developing a web part which display data in gridview and then export the grid to excel using following code. protected void ExportGridToExcel() { HtmlForm form = new HtmlForm(); string attachment = "attachment; filename=UserList.xls"; Page.Response.ClearContent(); Page.Response.AddHeader("content-disposition", attachment); Page.Response.ContentType = "application/ms-excel"; StringWriter stw = new StringWriter(); HtmlTextWriter htextw = new HtmlTextWriter(stw); form.Controls.Add(GridViewSiteDetails); this.Controls.Add(form); form.RenderControl(htextw); Page.Response.Write(stw.ToString()); Page.Response.End(); } But found that the export utility once called will disable other control to postback. Then after some search over net I found the following solution. Windows SharePoint Services JavaScript has a “form onSubmit wrapper” which is used to override the default form action. This work is put in place to ensure t...