Posts

Showing posts from October, 2008

Manual steps to re-create the Show Desktop icon

Manual steps to re-create the Show Desktop icon on the Quick Launch toolbar
The Show Desktop icon is not an ordinary program shortcut. If the icon is deleted, the procedure for re-creating the icon is not obvious.

To manually re-create the Show Desktop icon, follow these steps:

1. Click Start , click Run, type notepad, and then click OK.

2. In Notepad, type the following text on individual lines:
[Shell]
Command=2
IconFile=explorer.exe,3
[Taskbar]
Command=ToggleDesktop

3. On the File menu, click Save As, and then save the file to your desktop as Show Desktop.scf.

Note Notepad might automatically append a .txt extension to the file name. Remove this extension if present. The file name should be Show Desktop.scf.

The file must now be moved to the correct folder in the user profile to appear in the Quick Launch toolbar. To manually do this, use one of the following methods.

Ref: MSDN

Read SharePoint documents using SQL Server query

Image
Retrieve documents form the SharePoint website and display the same in your Windows forms application. No need to use SharePoint webservices or SharePoint Object model. Just run through the query to fetch the documents from the SharePoint using SQL query. Sample Code:
private void btnload_Click(object sender, EventArgs e)
{
string RootSite = txtsharepointsite.Text.ToString(); // "http://w2czbmlg01:12345/";
// Opening SQL connection for Microsoft SQL Server 2005
SqlConnection MySQLConnection = new SqlConnection(@"Data Source=W2CZBMLG01;Initial Catalog=WSS_Content_12345;Integrated Security=True");
// Passing SQL command text
string strSQLcmd = "SELECT CONVERT(nvarchar(36), Id) AS ID, '" + RootSite + "'+ DirName + '/' + LeafName AS Name, LeafName FROM dbo.Docs WHERE (LeafName NOT LIKE 'template%') AND LeafName LIKE '%.doc' ORDER BY DirName, LeafName";
SqlCommand MySQLCommand = new SqlCommand (strSQLcmd, MySQLConnection);
MySQ…