Developer forum

Forum » Integration » The given value of type String from the data source cannot be converted to type nvarchar of the specified target column.

The given value of type String from the data source cannot be converted to type nvarchar of the specified target column.

Dmitrij Jazel
Reply

hello Guys,

 

I am getting this error here:

Job Failed with the following message: The given value of type String from the data source cannot be converted to type nvarchar of the specified target column.

Since the data ammount I am trying to import is ennormous here, I almost can't find exact place where the issue happens,

But I have some susccions about one of the fields.

String length is 725 characters, and can be up to 1000.

In XML it is

<column columnName="ValueList">
<![CDATA[...LOOOOONGVALUE...]]>
</column>

As CustomProductField I created a "ValueList" in DW: "Long Text" datatype.

In DB this field is of type: nvarchar(max) - that should be more than enough to receive a reallllyyyy looooong string value.

 

Any suggestions?

 

/Dmitrij


Replies

 
Dmitriy Benyuk
Reply

Hi Dmitrij,

Need some more information for help with this issue: could you point what providers are you using for the source and destination?
And what version of Dynamicweb are you running?

Regards, Dmitrij

 
Dmitrij Jazel
Reply

Hi Dmitriy :)

I am using 8.5.1.11

As Source I am using "XML Provider" - with Default settings that it gets,

As Destination, I am using eCom Provider - also default settings that it gets.

 

I did the test, and it actually is that one column that has a very long string value.

As soon as I remove it from the column mapping, Integration works :)

 

So question is, if I am using XML as source, and eComprovider as destination, what custom field data should I use if I need to pass really long string value?

 

/Dmitrij

 
Dmitriy Benyuk
Reply

Hi Dmitrij,
I was trying to reproduce this on 8.5 and later and it was imoprted fine from xml->eCom with inserting long text to nvarchar(max) column. I've noticed I got this exception when I was tring to import this long text to some column with type nvarchar(255). Could you check your Column Mappings in the job settings if you are importing to the column that has a nvarchar(max) type in the Dynamicweb db?

 
Dmitrij Jazel
Reply

hei Dmitriy,

Well I thought about the same thing...

There is no problem to update a line in DB with that string value.

Let me try Deletin the column, and try adding it again.

Appearently that did not work....

Still getting "Job Failed with the following message: The given value of type String from the data source cannot be converted to type nvarchar of the specified target column.".

I should probably create the whole import activity from scratch?

 

/Dmitrij

 
Dmitrij Jazel
Reply
This post has been marked as an answer

And it looks like, it actually helped, just created This activity from scratch.

 

The story is that I originally created this activity, with a field that originally was Text(250).

Than I deleted that custom product field - and recreated with LongText.

But import activity should have understood the difference, but it didn't. Now looks like it works. :)

 

/Dmitrij

Votes for this answer: 1

 

You must be logged in to post in the forum