﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Integration Services / Data Warehousing  / SQL Task only passing first character of string to procedure / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Thu, 23 May 2013 11:44:49 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: SQL Task only passing first character of string to procedure</title><link>http://www.sqlservercentral.com/Forums/Topic1426403-364-1.aspx</link><description>[quote][b]Erin Ramsay (3/4/2013)[/b][hr]Booyah, Lowell! You hit it. I forgot to define the size of my stored proc variables.Good catch![/quote]IIRC, that maximum size for a DOS Path is 512 bytes.  Not sure what it is for a UNC but I'd bullet proof the code a bit by making the variables on both ends with a width of at least 512 or maybe even 1024.</description><pubDate>Mon, 04 Mar 2013 15:28:04 GMT</pubDate><dc:creator>Jeff Moden</dc:creator></item><item><title>RE: SQL Task only passing first character of string to procedure</title><link>http://www.sqlservercentral.com/Forums/Topic1426403-364-1.aspx</link><description>[quote][b]Lowell (3/4/2013)[/b][hr]--..I think that's what Phil is going after...bad definition in the Stored procedure.--[/quote]It was indeed :-)</description><pubDate>Mon, 04 Mar 2013 12:38:24 GMT</pubDate><dc:creator>Phil Parkin</dc:creator></item><item><title>RE: SQL Task only passing first character of string to procedure</title><link>http://www.sqlservercentral.com/Forums/Topic1426403-364-1.aspx</link><description>Booyah, Lowell! You hit it. I forgot to define the size of my stored proc variables.Good catch!</description><pubDate>Mon, 04 Mar 2013 12:36:30 GMT</pubDate><dc:creator>Erin Ramsay</dc:creator></item><item><title>RE: SQL Task only passing first character of string to procedure</title><link>http://www.sqlservercentral.com/Forums/Topic1426403-364-1.aspx</link><description>a parameter declared like [b]DECLARE @var NVARCHAR[/b] or [b]DECLARE @var2 VARCHAR[/b] has a size of ONE character...I think that's what Phil is going after...bad definition in the Stored procedure.you would want to explicitly define the size, if that's the case. @var NVARCHAR(255) or whatever is appropriate.</description><pubDate>Mon, 04 Mar 2013 12:25:17 GMT</pubDate><dc:creator>Lowell</dc:creator></item><item><title>RE: SQL Task only passing first character of string to procedure</title><link>http://www.sqlservercentral.com/Forums/Topic1426403-364-1.aspx</link><description>What are the parameters defined as in the stored proc definition?</description><pubDate>Mon, 04 Mar 2013 12:20:29 GMT</pubDate><dc:creator>Phil Parkin</dc:creator></item><item><title>SQL Task only passing first character of string to procedure</title><link>http://www.sqlservercentral.com/Forums/Topic1426403-364-1.aspx</link><description>I've created an ADO.Net connection to a SQL 2005 instance and am using a Execute SQL Task to pass two parameters. FileName (ie. aadc_test) and FilePath (ie. \\\\remoteserver\\directory) to a procedure. The first parameter is defined as string (255) and the second as string (1000) in both the task and the database has those fields as nvarchar(255) and nvarchar(1000) respectively.When the procedure runs it will insert the filename and path into the database but ONLY THE FIRST CHARACTER. So I'll get "a" and "\" in my fields. Can anyone tell me why I'm only getting the first character of my strings?Thanks,Erin</description><pubDate>Mon, 04 Mar 2013 12:17:23 GMT</pubDate><dc:creator>Erin Ramsay</dc:creator></item></channel></rss>