dbTalk Databases Forums  

Problem using GLobal Variables in DTS Package

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Problem using GLobal Variables in DTS Package in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
DaveM
 
Posts: n/a

Default Problem using GLobal Variables in DTS Package - 08-05-2005 , 12:55 PM






Hello,

I use SQL 2K on a Win2K box

I have created a DTS package, the data source is a stored procedure with an
integer for the only parameter like:

exec myproc intparm

When I have a literal for the parm, it runs fine. When I replace the number
with a question mark, I get this message:

No value given for one or more required parameters

I get this message when I try the Preview button, but the Parse Query
returns success.

If I save the package & execute it, it fails and I get the message:

Invalid character value for cast specification

I have created a global variable called FI_ID, set it to be an "INT", and
given it an initial value of "1" (one), without the quotes. I hae assigned
this to the parameter.

The source connection for the transformation uses Microsoft OLE DB Provider
for SQL Server, the destonation is a CSV file, so there is only one
transformation for all of the fields returned by the stored proc.

Any ideas?

Thanks,
Dave

Reply With Quote
  #2  
Old   
Vishal Parkar
 
Posts: n/a

Default RE: Problem using GLobal Variables in DTS Package - 08-05-2005 , 03:03 PM






Its a datype problem. Change the datatype of the global variable to integer.
With regards to preview its ok, as the value will be passed at run time.

--Vishal.

"DaveM" wrote:

Quote:
Hello,

I use SQL 2K on a Win2K box

I have created a DTS package, the data source is a stored procedure with an
integer for the only parameter like:

exec myproc intparm

When I have a literal for the parm, it runs fine. When I replace the number
with a question mark, I get this message:

No value given for one or more required parameters

I get this message when I try the Preview button, but the Parse Query
returns success.

If I save the package & execute it, it fails and I get the message:

Invalid character value for cast specification

I have created a global variable called FI_ID, set it to be an "INT", and
given it an initial value of "1" (one), without the quotes. I hae assigned
this to the parameter.

The source connection for the transformation uses Microsoft OLE DB Provider
for SQL Server, the destonation is a CSV file, so there is only one
transformation for all of the fields returned by the stored proc.

Any ideas?

Thanks,
Dave

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.