<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'NVarChar data type' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'NVarChar data type' posted on the 'Advanced VB.Net' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2012 Programmers Heaven</copyright>
    <pubDate>Wed, 23 May 2012 06:28:46 -0700</pubDate>
    <lastBuildDate>Wed, 23 May 2012 06:28:46 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>NVarChar data type</title>
      <link>http://www.programmersheaven.com/mb/TheOne/409024/409024/nvarchar-data-type/</link>
      <description>Foloowing code works perfectrly in VB.NET. However, when I tried to use it as VBScript with Integration Services, I got Error message &lt;span style="color: Red;"&gt;'String or binary data would be truncated. The statement has been terminated'&lt;/span&gt;. It is about NVarChar data type (see blue line of code).&lt;br /&gt;
&lt;br /&gt;
SQL Server 2008 Parameter&lt;br /&gt;
&lt;br /&gt;
@Body NVARCHAR(MAX)&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt; 
 Dim cmdInsert = New SqlClient.SqlCommand("usp_INSERT_UPDATE_ARTICLE_DA
TA_MIGRATION", insertConn)
            cmdInsert.CommandType = CommandType.StoredProcedure

            cmdInsert.Parameters.Add("@Title", SqlDbType.VarChar, 4000).Value = "testing"
            &lt;span style="color: Blue;"&gt;cmdInsert.Parameters.Add("@Body", SqlDbType.NVarChar).Value = stringAdd&lt;/span&gt;
            cmdInsert.Parameters.Add("@ArticleDate", SqlDbType.DateTime).Value = Now()

            cmdInsert.ExecuteNonQuery()

            cmdInsert.Dispose()
Any idea how to fix this problem? Again it is about Integration Services VBScript task &lt;/pre&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/TheOne/409024/409024/nvarchar-data-type/</guid>
      <pubDate>Tue, 10 Nov 2009 07:30:07 -0700</pubDate>
      <category>Advanced VB.Net</category>
    </item>
    <item>
      <title>Re: NVarChar data type</title>
      <link>http://www.programmersheaven.com/mb/TheOne/409024/409168/re-nvarchar-data-type/#409168</link>
      <description>Never mind. It fixed.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/TheOne/409024/409168/re-nvarchar-data-type/#409168</guid>
      <pubDate>Thu, 12 Nov 2009 07:41:32 -0700</pubDate>
      <category>Advanced VB.Net</category>
    </item>
    <item>
      <title>Re: NVarChar data type</title>
      <link>http://www.programmersheaven.com/mb/TheOne/409024/414881/re-nvarchar-data-type/#414881</link>
      <description>Have you tried explicitly specifying the max in your parameter declaration? &lt;br /&gt;
&lt;br /&gt;
 @Body nvarchar(4000)&lt;br /&gt;
&lt;br /&gt;
I had an issue with this datatype being declared as "MAX" because of a legacy issue.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/TheOne/409024/414881/re-nvarchar-data-type/#414881</guid>
      <pubDate>Thu, 25 Mar 2010 13:51:43 -0700</pubDate>
      <category>Advanced VB.Net</category>
    </item>
  </channel>
</rss>
