Tag Archives: error

Error: Invalid column type from bcp client for colid 1 when writing to view in SSIS

The following scenario might happen when trying to write to a view after the underlying table has been updated.

The example uses a table that is first created with a column allowing nulls. A view is then created on top of it and then the table is updated to not allow nulls for the column.

Writing to the view using SSIS (with default settings) will fail until the view is refreshed to take the current table definition into account.

This scenario uses SQL Server 2014 and Visual Studio 2013 SSDT BI for SSIS.

Reproduction

To test we can create a Demo Database with a demo table and a demo view:

1, Create Demo Table:

We create a demo table in a demo database. The table is as simple as possible with an identity column and a default data column allowing nulls

USE [Demo]
GO

CREATE TABLE [dbo].[DemoTable](
    [DemoId] [INT] IDENTITY(1,1) NOT NULL,
    [DemoString] [NCHAR](10) NULL
) ON [PRIMARY]

GO

 2, Create View

The view is created on the table when the DemoString column allows nulls

USE [Demo]
GO

CREATE VIEW [dbo].[DemoView]
AS
SELECT DemoId, DemoString
FROM   dbo.DemoTable

GO

 

3, alter the table to not allow nulls

the DemoString column is updated with NOT NULL

USE [Demo]
GO

ALTER TABLE [dbo].[DemoTable]
    ALTER COLUMN DemoString NCHAR(10) NOT NULL
GO

3, Create a SSIS package that writes to the view

Create a sample SSIS project that will transfer information into the view:

image

Source

image

Destination

image

Destination

Run the package:

image

Error message

image

Error message

The package will fail to run with the following error messages:

Error message 1
[OLE DB Destination [2]] Error: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 11.0"  Hresult: 0x80004005  Description: "Invalid column type from bcp client for colid 1.".
Error message 2
[OLE DB Destination [2]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR.  The "OLE DB Destination.Inputs[OLE DB Destination Input]" failed because error code 0xC020907B occurred, and the error row disposition on "OLE DB Destination.Inputs[OLE DB Destination Input]" specifies failure on error. An error occurred on the specified object of the specified component.  There may be error messages posted before this with more information about the failure.
Error message 3

[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PROCESSINPUTFAILED.  The ProcessInput method on component "OLE DB Destination" (2) failed with error code 0xC0209029 while processing input "OLE DB Destination Input" (15). The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running.  There may be error messages posted before this with more information about the failure.

 

4, Update the view to take the new table definition into account:

Recreate the view, such as with this alter statement.

USE [Demo]
GO

ALTER VIEW [dbo].[DemoView]
AS
SELECT DemoId, DemoString
FROM   dbo.DemoTable

GO

 

5, Rerun the SSIS package and it will run successfully:

image

Successful run

Error: Load operation failed for query ‘GetAuthenticationInfo’.

How to solve the error: Load operation failed for query ‘GetAuthenticationInfo’ when deploying a LightSwitch 2012 application to a Windows Server 2008 R2 using IIS.

Scenario: The following error message appears in browser instead of the expected LightSwitch-based web application. The application has been developed using Microsoft LightSwitch in Visual Studio 2012. The application works as expected on the development machine but fails to run in a Microsoft Windows Server 2008 R2 environment even though the LightSwitch server side prerequisites has been installed.

Load operation failed for query ‘GetAuthenticationInfo’. [HttpWebRequest_WebException_RemoteServer]
Arguments: NotFound
Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=5.1.30214.0&File=System.Windows.dll&Key=HttpWebRequest_WebException_RemoteServer

Sample Screenshot:

LightSwitch_Error_Screenshot

After some troubleshooting it turns out that it is because the wrong version of WCF Data Services for OData had been installed. The proper version for a Visual Studio 2012 based LightSwitch application is WCF Data Services 5.0 for OData V3 and it is available for download here:
http://www.microsoft.com/en-us/download/details.aspx?id=29306

After installation and a web site restart the application worked as expected.

Unable to open SharePoint Online document library in File Explorer

Introduction

SharePoint features a very useful function that enables users to open a document library as if it is a normal folder inside File Explorer. This would give the user access to normal file operations such as copy, move etc.

fileexplorer-english

Look and feel of Open with Explorer in SharePoint 2013 in English

fileexplorer-swedish

Look and feel of Öppna med Utforskaren in SharePoint 2010 in Swedish

Issue

When using Windows 7 and Internet Explorer 10 to open a document library the following error message appears and the library does not open in File Explorer:

fileexplorer-errormsg-english

We’re having a problem opening this location in File Explorer. Add this web site to your Trusted Sites list and try again.

A similar error message in Swedish:

fileexplorer-errormsg-swedish

Klienten har inte stöd för att öppna den här listan med Utforskaren.

Solution

Update: There is now a hotfix available at: http://support.microsoft.com/kb/2846960 that should solve the issue for Windows 7 and IE10.

Not really…

At the moment this is a known issue with Internet Explorer 10 in Windows 7. The suggestion from Microsoft is to de-install IE10 and use an earlier version. Another option would be to upgrade to Windows 8.

Unfortunately my current PC (HP EliteBook 8540w) does not support Windows 8, and Internet Explorer 9 isn’t really an option anymore.

Read more at the Microsoft support site: http://support.microsoft.com/kb/2835527

More supporting information here: How to use the “Open with Explorer” command and how to troubleshoot issues with this option in SharePoint Online – http://support.microsoft.com/kb/2629108

This is posted as a follow up to my post on how to get explorer view to work in SharePoint 2010: http://www.stefanjohansson.org/2012/01/how-to-get-explorer-view-to-work-in-sharepoint-2010/ – obviously this won’t cut it in the above scenario.

Unable to create folder in SharePoint 2013 library

1-aspx_debug_error

This error, “Sorry, something went wrong. The aspx_debug attribute on the page directive is not allowed in this page” occurs when trying to create a folder in some types of document libraries, such as the Report Document Library used for SQL Server Reporting Services report documents in SharePoint 2013.

The error comes from some bad /Upload.aspx files that are used by SharePoint 2013.

identifying the upload file for a Report Document Library gives us this standard file path:

C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\FEATURES\ReportsAndDataListTemplates\ReportDocumentLibrary\Upload.aspx

The standard contents:

3-upload_aspxfile

By updating the contents with something that makes more sense we can get the folder creation feature to work again:

workingfilecontents

Do note that all page directives needs to go, and we need to update the UIVersion property from 15 to 4 otherwise we just get new exciting errors.

Continue reading

Excel Services errors when AS cube changes

When using Excel Services to display data from an Analysis Services cube, the following error might occur when the cube structure changes.

Web part page error

If the Excel spreadsheet is displayed as a web part, the following error will appear in the web part page:

image

Text: Error. Web Part Error: An error occurred while setting the value of this property: Microsoft.Office.Excel.WebUI.ExcelWebRenderer:WorkbookUri – Exception has been thrown by the target of an invocation.

Edit Web part error message

image

 

Text: Cannot save all of the property settings for this Web Part. An error has occurred

An item with the same key has already been added.

The error comes in scenarios such as: after cube changes such as when a dimension has been deleted, and this dimension is used as a page filter in the Excel pivot table and the page filter was a named item and the named item was exposed as a parameter to Excel Services when saved into SharePoint. If the Excel file is updated with the new metadata from the cube but the named items is not, the error message appears.

The solution is to update the Excel file with the new metadata from the cube and also update the named items used as parameters so that they correspond to the relevant cells in the filters area.