Dave's Technophorical Times

A blog about Microsoft's Technologies!
SharePoint :: MVC :: ASP.NET :: IIS :: SQL Server :: Visual Studio :: MS Access

Just as an FYI when moving from sharePoint 2010 to SharePoint 2013. The images folder is now accessed via _layouts/15/images. SharePoint 2010 was just _layouts/images!



Aug
11

SQL White Spaces

by Dave Stuart | Tags:

I found myself with an issue with SQL Data. I could not trim the data with the trailing white space. Only this worked!

  UPDATE tblPipeClasses
  SET PipeClass =  Replace(PipeClass, Char(160),'')

I also wrote this function in VBA

Public Function RemoveExtendedAsciiCharacters(strString As String) As String

    Dim intCount As Integer    

    For intCount = 128 To 255

        If InStr(1, strString, Chr(intCount)) > 0 Then

            strString = Replace(strString, Chr(intCount), "")

        End If

    Next intCount    

    RemoveExtendedAsciiCharacters = strString

End Function

 



URL: http://etienne-sharepoint.blogspot.com/2011/10/solving-missingsetupfile-errors-from.html

This is for MissingWebPart, MissingAssembly and MissingFeature



In SQL Server 2012R2 I found that my Log files were always getting so big that they would fill the L drive. So I wrote a script that will Truncate all the Log files. You can also do this on each individual database by right clicking, select Shrink, then Files. Click OK. See below for more details.

Also Check this URL: What is the command to truncate a SQL Server log file? - Stack Overflow

In management studio:

  • Don't do this on a live environment, but to ensure you shrink your dev db as much as you can:
    • Right-click the database, choose Properties, then Options.
    • Make sure "Recovery model" is set to "Simple", not "Full"
    • Click OK
  • Right-click the database again, choose Tasks -> Shrink -> Files
  • Change file type to "Log"
  • Click OK.

Alternatively, the SQL to do it:

USE DatabaseName
ALTER
DATABASE DatabaseNameSET RECOVERY SIMPLE
DBCC SHRINKFILE (DatabaseName_Log, 1)



SharePoint 2010 CU update error: CanUpgrade [Microsoft.SharePoint.Administration.SPIisWebSite] failed.

https://social.msdn.microsoft.com/Forums/en-US/f6f30ede-b614-4773-be98-0c9fac29ca37/upgrade-session-failed-100-complete?forum=sharepointadmin

Steps to Resolve:
-----------------------------------

Open Central Admin - Manage Web Applications - Select web application - Click on Delete Drop Down (Do not click on Delete Button) - Select Remove SharePoint from IIS Web site - Click following drop down - Remove SharePoint from IIS - Select IIS web site and zone to remove - Check if you see any web site which is not present in IIS - If you see any web site which is not under IIS then just select that and remove it from SharePoint.

Note:- Follow above steps on all SharePoint web servers.

Once above steps are done you can again run the PSConfig upgrade wizard and it should be successfull.

Upgrade command: psconfig.exe -cmd upgrade -inplace b2b -wait -force

 



The solution is here: [SOLVED] Relocate Virtual Machine Files - Spiceworks

Basically, shut down the VM. Right-Click on it and Select Move. Then Move the Configuration. Done!



This was the fix.

  1. Open SharePoint PowerShell as Administrator
  2. Run this Get-SPServiceInstance -All > Get-SPServiceInstance.txt
    1. It will export all Services to the text file un C:\Users\[Username]\ Get-SPServiceInstance.txt
  3. Find the GUID for the Search Service. It was c0220b13-8093-4240-91e4-8427a68e8c0c
  4. Run the following 3 commands
  5. $value = Get-SPServiceInstance -Identity c0220b13-8093-4240-91e4-8427a68e8c0c
  6. $value.provision()
  7. $value.update()
  8. Reboot the SharePoint Server.
  9. Check that the Incremental Search has started!



From here: https://serverfault.com/questions/396722/your-system-administrator-does-not-allow-the-use-of-saved-credentials-to-log-on

If you don't want to change local or server side GPOs:

Go to Control Panel -> Credential Manager on the local computer you are trying to connect from.
You will see three sections:

  1. Windows Credentials
  2. Certificate-Based Credentials
  3. Generic Credentials

Remove the credentials from Windows Credentials and add it to Generic Credentials.



From here: https://superuser.com/questions/579900/why-cant-excel-open-a-file-when-run-from-task-scheduler

1. Open Component Services (Start -> Run, type in dcomcnfg)
2. Drill down to Component Services -> Computers -> My Computer and click on DCOM Config
3. Right-click on Microsoft Excel Application and choose Properties
4. In the Identity tab select This User and enter the ID and password of an interactive user account (domain or local) and click Ok
Keeping it as the interactive user or the launching doesn't work with the task scheduler unfortunately, even when setting the task up to run under an account that has admin access to the machine.

 



From here: https://www.access-programmers.co.uk/forums/threads/subreport-headers.256308/
In the Subreport do the following and you will have the Report header on subsequent pages.

1. Click on "Add a Group"
2. Select "Expression"
3. When the Expression Window appears, type in "=0" and click OK
4. Make this group only have a header section
5. Click on the group's header section
6. Go to Property Sheet and make sure "Repeat Section" is set to "Yes"
Done!



The Blogger

Dave Stuart I'm a Developer with a passion for coding. I enjoy the challengers that come with the job! SharePoint is one of my expert areas along with .NET Web Development with MVC and good old MS Access VBA coding. I Blog so that I can remember how I did that way back when; PLUS all this stuff is searchable! I constantly study and run my own business, Dafran Inc. I have passed 22 Microsoft Exams since 1998 when I first jumped on the treadmill of knowledge. I hope that you enjoy this Blog as much as I enjoy updating it. All the very best from Calgary, Alberta, Canada. contact me at linkedin @ dafran.ca

Calendar

<<  October 2021  >>
MoTuWeThFrSaSu
27282930123
45678910
11121314151617
18192021222324
25262728293031
1234567

View posts in large calendar

Sign in