Microsoft Access 2007-2010: Removing a Control Layout

Do you use the report wizard to help you create reports in Microsoft Access 2007? If you do, you are probably aware of the control layout. Many controls are automatically grouped into a layout when you use the wizard to create a report. These control layouts help you to arrange the controls, i.e. text boxes and labels, as a group. When you move or resize one control, the other controls will automatically adjust accordingly. While using layouts can save you time when manipulating controls, they can also be restricting. It is possible to remove a control layout. To remove a control layout, you need to view the report in the design or layout view. Once in the appropriate view, select the controls you want to remove from the layout. Then select the Arrange tab on the ribbon and click the Remove button located within the control layout section. With the control layout removed you will be able to independently move and resize the controls within your report.

SharePoint 2010 Scheduled Crawls not Running

I had this problem and the symptom was that the SharePoint Services Search Refresh timer job was in a failed state on one of the servers.  

I fixed it with the following steps:

1) Stop the Windows SharePoint Timer Service
2) Navigate to C:\Documents and Settings\All Users\Application Data\Microsoft\SharePoint\Config
3) Go into the single folder in there that has a GUID type name.
4) You see a whole bunch of XML files and a file cache.ini
5) Copy all the XML files to another folder somewhere (for backup), then delete them but do not delete cache.ini
6) Edit cache.ini to contain just the number "1" in the file - erase whatever is there and replace with "1"
7) Restart the Windows SharePoint Timer Service
8) You should see XML files being regenerated in the folder

Do these steps on all the front-end servers and index/query servers.  In our case on our index & query server the Windows SharePoint Timer Service was jammed in a "stopping" state so we rebooted the server and that cleared it and allowed the SharePoint Services Search Refresh timer job to succeeed. 

It also, as a bonus, finished off the deployment of a WSP solution that had got stuck in the "deploying" state when attempting to deploy.

Search Error HRESULT E_FAIL has been returned from a call to a COM component

Problem:

Recently our content source for the sharepoint sites no longer crawls and instead throws up the Error HRESULT E_FAIL has been returned from a call to a COM component

I had a look on the web and the only solution has been to change impersonation settings from false to true in the web config. Unfortunately ours was already set to true and I still have this error. Cannot get the crawl to work in sharepoint now.

Resolution:

Check the web application's website in IIS 7.

Under Authentication, make sure ASP.NET Impersonation is ENABLED. Mine was disabled and caused this error. If you have applications in SharePoint that need this disabled, you might want to extend the web application it another IIS website and Disable impersonation for users, keeping the default web application's zone enabled for search crawls on that URL.

Ensure this is set for each of the Web Applications that you wish to crawl.

Another common Crawl issue is using an AD service Account that has not been added to the SharePoint Managed Accounts.

SharePoint 2010 : Exception: Microsoft.SharePoint.Administration.SPUpdatedConcurrencyException

Initial Blog:
http://blogs.technet.com/b/sushrao/archive/2011/12/01/sharepoint-2010-exception-microsoft-sharepoint-administration-spupdatedconcurrencyexception.aspx

I just want to make sure I never lose this information!

After applying a cumulative update\ service pack on SharePoint Servers when we run psconfig.exe -cmd upgrade -inplace b2b –wait -force it fails on step 3 with the error message

"Exception: Microsoft.SharePoint.Administration.SPUpdatedConcurrencyException: An update conflict has occurred, and you must re-try this action. The object SPUpgradeSession Name=Upgrade-20110604-023550-824 was updated by Topgear\administrator, in the PSCONFIG (4272) process, on machine SharePoint2010. View the tracing log for more information about the conflict"

Resolution:

Open command prompt on the SharePoint Server (Run as Administrator)

Navigate to following location

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Bin

Execute:

stsadm -o setproperty -pn command-line-upgrade-running -pv Yes

Note: Running the above command on the SharePoint server will reset the command-line-upgrade-running property where an upgrade process stopped responding. Also, this command needs to be executed on each SharePoint Servers in the farm after the upgrade completes successfully on first server

Later, execute following to initiate the upgrade process again.

psconfig.exe -cmd upgrade -inplace b2b –wait –force

Note: If the upgrade fails with any errors re-view the upgrade.log file as it would contain detailed information to troubleshoot.

SSRS Report site Security

The SSRS Reports website security can sometimes be troublesome when first configured and trying to connect to it from a remote machine. The RSReportServer.config file has a AuthenticationType section that required attention if you are prompted for authentication when accessing the site remotely. By default you may get all 3 types, however if you are just using regular Windows authentication you should only have RSWindowsNTLM in the list. Removing the other 2 will allow you into the site, provided you have access to the database.

 

      <AuthenticationTypes>
             <RSWindowsNegotiate />
             <RSWindowsKerberos />
             <RSWindowsNTLM />
      </AuthenticationTypes>

How to find a Field in a SQL Database

Replace Diameter with your own search.

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 '%Diameter%'
ORDER BY schema_name, table_name;

List ALL fields in a Database

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 
ORDER BY schema_name, table_name;


Hope this helps.

JavaScript Date Object

JavaScript Date Object

Describes the JavaScript Date Object including properties, constructors, and methods.

Properties

  • prototype - For creating more properties.

Constructors

  • Date() - Use the current date and time to create an instance of the object date.
  • Date(dateString) - Use the date specified by the string to create the instance of the date object. String format is "month day, year hours:minutes:seconds".
  • Date(year, month, day) - Create an instance of date with the specified values. Year is 0 to 99.
  • Date(year, month, day, hours, minutes, seconds) - Create an instance of date with the specified values.

Methods

  • getDate() - Get the day of the month. It is returned as a value between 1 and 31.
    var curdate = new Date()
    var mday = curdate.getDate()
    document.write(mday + "<BR>")
    

    The above code prints the day of the month.

  • getDay() - Get the day of the week as a value from 0 to 6
    var curdate = new Date()
    var wday = curdate.getDate()
    document.write(wday + "<BR>")
    

    The above code prints the day of the week.

  • getHours() - The value returned is 0 through 23.
    var curdate = new Date()
    var hours = curdate.getHours()
    document.write(hours + "<BR>")
    

    The above code prints the hours since midnight.

  • getMinutes() - The value returned is 0 through 59.
    var curdate = new Date()
    var minutes = curdate.getMinutes()
    document.write(minutes + "<BR>")
    

    The above code prints the minutes past the hour.

  • getMonth() - Returns the month from the date object as a value from 0 through 11.
    var curdate = new Date()
    var month = curdate.getMonth()
    document.write(month + "<BR>")
    

    The above code prints the numeric value of the month.

  • getSeconds() - The value returned is 0 through 59.
    var curdate = new Date()
    var seconds = curdate.getSeconds()
    document.write(seconds + "<BR>")
    

    The above code prints the seconds since the last minute.

  • getTime() - The number of milliseconds since January 1, 1970. this function allows you to manipulate the date object based on a millisecond value then convert it back to the form you want. In the example below, it is used to set a future expiration time of a cookie.
    var futdate = new Date()
    var expdate = futdate.getTime()
    expdate += 3600*1000 //expires in 1 hour(milliseconds) 
    futdate.setTime(expdate)
    
  • getTimeZoneOffset() - Time zone offset in hours which is the difference between GMT and local time.
    var curdate = new Date()
    var offset = curdate.getTimeZoneOffset()
    document.write(offset + "<BR>")
    

    The above code prints the number of hours different between your timezone and GMT. This value may change with daylight savings time..

  • getYear() - Returns the numeric four digit value of the year.
    var curdate = new Date()
    var year = curdate.getYear()
    document.write(year + "<BR>")
    

    The above code prints the numeric value of the year which is currently 2000.

  • parse() - The number of milliseconds after midnight January 1, 1970 till the given date espressed as a string in the example which is IETF format.
    var curdate = "Wed, 18 Oct 2000 13:00:00 EST"
    var dt = Date.parse(curdate)
    document.write(dt + "<BR>")
    
  • setDate(value) - Set the day of the month in the date object as a value from 1 to 31.
  • setHours(value) - Set the hours in the date object with a value of 0 through 59.
  • setMinutes(value) - Set the minutes in the date object with a value of 0 through 59.
  • setMonth(value) - Set the month in the date object as a value of 0 through 11.
  • setSeconds(value) - Set the seconds in the date object with a value of 0 through 59.
  • setTime(value) - Sets time on the basis of number of milliseconds since January 1, 1970. The below example sets the date object to one hour in the future.
    var futdate = new Date()
    var expdate = futdate.getTime()
    expdate += 3600*1000 //expires in 1 hour(milliseconds) 
    futdate.setTime(expdate)
    
  • setYear(value) - Set the year in the date instance as a 4 digit numeric value.
  • toGMTString() - Convert date to GMT format in a form similar to "Fri, 29 Sep 2000 06:23:54 GMT".
    var curdate = new Date()
    dstring = curdate.toGMTString()
    document.write(dstring + "<BR>" + curdate.toLocaleString() + "<BR>")
    

    The above example produces:

    Wed, 18 Oct 2000 18:08:11 UTC
    10/18/2000 14:08:11
    
  • toLocaleString() - Convert date to local time zone format. See the example, above.
  • UTC() - Based on a comma delimited string, the number of milliseconds after midnight January 1, 1970 GMT is returned. The syntax of the string is "year, month, day [, hrs] [, min] [, sec]". An example is "2000, 9, 29, 5, 43, 0" for Sept 29, 2000 at 5:43:0. The string is considered to be GMT. The hours, minutes, and seconds are optional.
    document.write(Date.UTC(2000, 9, 29, 5, 43, 0) + "
    ")

    The above example produces:

    972798180000
    

VS2010 and IE10 Attaching the Script debugger to process iexplore.exe failed

If you have installed IE10 and you are running Visual Studio 2010, you may get this annoying pop-up.
"Attached the Script debugger to process '[1111] iexplore.exe' on machine 'MINE' failed. A debugger is already attached."
There is a simpler fix for the JavaScript debugging issue in IE10:
  1. Close IE
  2. In elevated cmd prompt run this command:

regsvr32.exe "%ProgramFiles(x86)%\Common Files\Microsoft Shared\VS7Debug\msdbg2.dll

or %ProogramFiles% on a 32-bit OS.

Hope this helps!

Cannot deactivate site template (solution) after creating and deleting a new site

Problem: In SharePoint 2010, I created a new site template from an existing site and a new site using this template. After deleting the new site and I cannot deactivate the site template to be able to remove it. Here's the exception I get:
System.ArgumentException: Value does not fall within the expected range. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Stack Trace: [ArgumentException: Value does not fall within the expected range.] Microsoft.SharePoint.SPWebCollection.get_Item(Guid id) +27763375 Microsoft.SharePoint.SPFeatureEnumeratorBase.GetCachedWeb(SPSite site, Guid webId, Guid featureId) +252 [SPFeatureIsOrphanedException: Unable to access web scoped feature (Id: 5c143ca0-e513-4fa5-93a6-a926352c982e) because it references a non-existent or broken web (Id: 196cdf6e-d4a1-4cb6-b962-591aaa3c5f43) on site 'http://win-9o8m2cks1v7'. Exception: System.ArgumentException: Value does not fall within the expected range. at Microsoft.SharePoint.SPWebCollection.get_Item(Guid id)
Solution: Go to the Site Settings page for the root web of your site collection. Under the heading Site Collection Administration, click the Recycle bin link. On the QuickLaunch menu, select End User Recycle Bin items, then select all the items that appear and click the Delete Selection link at the top of the items list. Now select Deleted From End User Recycle Bin from the QuickLaunch Menu and do the same.
Now return to the solution gallery and you should be able to deactivate and delete your solution.

SharePoint 2010 – Attach multiple files to a list item

How to attach multiple files to a single list item, such as a Task List. Most people know about the “Upload Multiple Documents” option in document libraries. This option isn’t there with list items.

What you can do is attach files individually. You can keep attaching as many files as you like.

  1. Click Attach File from the ribbon
  2. Select first file you want attached
  3. Repeat

The files will now be listed in the “Attachment” section of your list item properties.