02/02/11
Fahad Zia
tags:  

ASUS P5N7A-VM HDMI Intermittent Signal Loss FIX


Windows Vista on my HTPC (http://www.newegg.com/Product/Product.aspx?Item=N82E16813131348) made me feel ancient so I decided to upgrade to Windows 7. But to my surprise I wish I had not done it since the screen would not stop losing signal every minute or two. I tried latest and older drivers from Nvidia’s but it wouldnt work so before I reloaded Vista I found this page which has great information about various issues with this motherboard:

http://www.avsforum.com/avs-vb/showthread.php?t=1079923

From this I found out that I have to downgrade the video drivers to 178.24 version to get a stable display which worked for me. Here are the links to the drivers that worked on Windows 7 :

http://www.nvidia.com/object/winvista_x86_178.24_whql.html
http://www.nvidia.com/object/winvista_x64_178.24_whql.html

12/13/10
Fahad Zia
tags:  

Renaming SharePoint Title site column back to Title throws error: “The Column name you entered is already in use or reserved.Choose another name”


reserved_column_name

It is recommended not to rename OOTB Title site column but if for some reason you have done this. There are 2 ways it can be changed back:

1. Using SharePoint Manager
http://spm.codeplex.com
This is easier of the two and it requires you to install SPM 2007 on the SharePoint server you are making changes to. Open SPM and drill down to the site collection’s fields collection and click on changed Title field (InternalName=’Title’). In the “SchemaXml” value change “DisplayName” back to “Title” and save the changes.

2. Using SharePoint Object Model
Use the following articles to run the code on the server.
http://support.microsoft.com/kb/923589
http://sharepoint.microsoft.com/Blogs/fromthefield/Lists/Posts/Post.aspx?ID=15
http://www.endusersharepoint.com/2009/01/21/hidden-content-types-and-hidden-site-columns/
Note the use of “PushChangesToLists” method in the first article that will modify this field in the list too which cant be done from SPM.

If you wonder why this happens, check this post:
http://hristopavlov.wordpress.com/2009/01/15/the-column-name-that-you-entered-is-already-in-use-or-reserved-choose-another-name/

12/10/10
Fahad Zia

Workflow History List URL for SPD/WF/Nintex


If you are logging messages as part of your workflow and need to see where it goes then go to your site where workflow is running to view this hidden list:
SPD/WF: http://SiteURL/Lists/Worflow History

If you are using Nintex Workflow 2007, then the logs can be seen here:
Nintex: http://SiteURL/Lists/NintexWorkflowHistory

11/13/10
Fahad Zia

Running large T-SQL files using SQLCMD


Recently I had to export data and schema of one of the databases ,which I did not have direct access to, using sql publishing wizard. The exported file was 400 MB and using SQL Server 2005 I was not able to import all data as it would complain about memory issues opening this file. I had to use SQLCMD -i command to import this file.
More info on how to run sql queries using SQLCMD can be viewed here: http://msdn.microsoft.com/en-us/library/ms170207.aspx

10/15/10
Fahad Zia
tags:  

Copy DLL from GAC


The easiest way I came across to copying dlls from GAC is using DOS’s subst command. This creates a virtual drive pointing to the folder.
Steps:
1. In command prompt type subst X: C:\Windows\Assembly where X is the drive letter
2. Browse X: using My Computer and see everything in GAC as folders and files

Reference:
http://en.wikipedia.org/wiki/Subst
http://rmanimaran.wordpress.com/2008/08/05/get-a-copy-of-dll-in-gac-or-add-reference-to-a-dll-in-gac/

09/30/10
Fahad Zia
tags:  

Lists.asmx GetListItems dataset does not include empty column


To better explain this, lets say i have a list with the following columns:

Department, Position
IT, Senior System Administrator
IT, Junior Programmer
HR,

using GetListItems on this list will include ows_Position node (provided that the CAML query does not have any filters for this example so its a SELECT * ) but now if the same list and query has no data in Position column:

Department, Position
IT,
IT,
HR,

the GetListItems will NOT have ows_Position node.
I recently came across this issue when reading values from a list that had an empty column and after converting the GetListItems to a dataset the datatable would not have this empty column listed

09/28/10
Fahad Zia

ProcessBatchData: Value does not fall within the expected range


This may apply to other funtions that use xml file but in my case i was using ProcessBatchData with correctly formatted xml string as the argument (atleast thats what thought since I could open the xml string fine in IE and Visual Studio debugger). After hours of debugging and googling i found out that it was because i was using single quotes in xml declaration!:
Wrong :

string strXML = "<?xml version='1.0' encoding='UTF-8'?>"

Correct:

string strXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" 

Page where i found this:
http://pholpar.wordpress.com/2010/02/05/how-to-change-the-order-of-the-fields-on-a-sharepoint-form-using-code/

08/24/10
Fahad Zia

Display total number of filtered list items using jQuery


There are several options to make this happen but I wanted a quick way to display total number of filtered items(By filtered I mean using CAML operators). I could think of the following ways:

1. Custom Web Part
2. SharePoint Designer
3. Using jQuery and SharePoint Web Services

I opted for 3 after I found out i could do this using only CEWP.
http://spservices.codeplex.com/

here is my code:

<script type="text/javascript" src="_layouts/Project/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="_layouts/Project/jquery.SPServices-0.5.6.min.js"></script>
<script language="javascript" type="text/javascript">
var $j=jQuery.noConflict();
$j(document).ready(function() {
  var total="";
  $j().SPServices({
    operation: "GetListItems",
    async: false,
    listName: "Workflow Tasks",
    CAMLViewFields: "<ViewFields><FieldRef Name='Title' /></ViewFields>",
    CAMLQuery:"<Query><Where><And><Neq><FieldRef Name='PercentComplete' /><Value Type='Number'>1</Value></Neq><Contains><FieldRef Name='ProjectStatus' /><Value Type='Text'>In Engineering</Value></Contains></And></Where></Query>",
    completefunc: function (xData, Status) {
      total=$j(xData.responseXML).find("[nodeName=rs:data]").attr("ItemCount");  
      $j("#lblTotalEngineering").text("Total Open Items (In Engineering): " + total);
     }
  });
});
</script>
<ul id="lblTotalEngineering"/>
06/29/10
Fahad Zia
tags:  

Add Web Parts to EditForm.aspx, DispForm.aspx or NewForm.aspx


add &toolpaneview=2 in the page query of EditForm.aspx, DispForm.aspx or NewForm.aspx


Fahad Zia

SharePoint Web Part Maintenance Page URL


Its time consuming to manually delete closed webparts on a page esp if there are more than 40(yes some user created these webparts and instead of deleting them closed them). So a quick way to do this is appending ?contents=1 after the .aspx in the url