![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
This is a baffling situation: I have a Transform Data Task in DTS (SQL 2000 SP2). The source for the task calls a simple stored procedure with 2 parameters: @CID int and @accesstablename varchar(50). If I pass literals for both parameters...i.e. exec ap_ds_getstagingdata 141, 'Points' ...the query runs fine. I can click Preview and the results appear. However, if I use a global variable and parameterize the statement...e.g. exec ap_ds_getstagingdata ?, 'Points' ...I get a "No value given for one or more required parameters" error upon clicking Preview, and if I advance to Transformations I get no columns on the source side because the SP is using dynamic SQL. The global variable ConversionID *is* defined, and has a default value of 141. Things I've tried to no avail: 1) Change the type of ConversionID from Integer to Int 2) Change the type of ConversionID from Integer to String 3) Reverse the order of the parameters in the SP, and likewise in the call to the SP 4) Delete and retype the value of ConversionID, just in case there are invalid characters hiding in there somewhere. 5) Completely delete and recreate the ConversionID global variable 6) Try a simple select statement instead of the SP. If I use "select * from conversionlog where conversionid = ?", the result is the same error when clicking on Preview, but the columns are at least visible in the Transformations tab. I'm stumped. Is this a known bug? Or can anyone see where I'm going wrong here? -Jonathan Van Matre |
#3
| |||
| |||
|
|
Mine seems to work Stored proc is CREATE PROCEDURE TwoPassInParams @Param1 int, @param2 varchar(50) AS SET NOCOUNT ON GO Statement is exec TwoPassInParams ?, 'DTS' What SP level are you using? I am using Microsoft SQL Server 2000 - 8.00.818 (Intel X86) May 31 2003 16:08:15 Copyright (c) 1988-2003 Microsoft Corporation Developer Edition on Windows NT 5.1 (Build 2600: Service Pack 1) You can always set the parameter from code so actually pass a constant like this Global Variables and SQL statements in DTS (http://www.sqldts.com/Default.aspx?205) |
#4
| |||
| |||
|
|
I'm on SP2--see above. The full version is Microsoft SQL Server 2000 - 8.00.679 (Intel X86) Aug 26 2002 15:09:48 Copyright (c) 1988-2000 Microsoft Corporation Standard Edition on Windows NT 5.0 (Build 2195: Service Pack 4) Unfortunately, there's not much chance of service-packing the server right now, unless we can establish that this is a known bug fixed by the SP. I dug around in the Microsoft knowledge base and didn't find any relevant bug references. I'll try your method, but I don't think I'm wrong in expecting it should work the way I'm doing it. -Jonathan Van Matre "Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote Mine seems to work Stored proc is CREATE PROCEDURE TwoPassInParams @Param1 int, @param2 varchar(50) AS SET NOCOUNT ON GO Statement is exec TwoPassInParams ?, 'DTS' What SP level are you using? I am using Microsoft SQL Server 2000 - 8.00.818 (Intel X86) May 31 2003 16:08:15 Copyright (c) 1988-2003 Microsoft Corporation Developer Edition on Windows NT 5.1 (Build 2600: Service Pack 1) You can always set the parameter from code so actually pass a constant like this Global Variables and SQL statements in DTS (http://www.sqldts.com/Default.aspx?205) |
#5
| |||
| |||
|
|
I'm on SP2--see above. The full version is Microsoft SQL Server 2000 - 8.00.679 (Intel X86) Aug 26 2002 15:09:48 Copyright (c) 1988-2000 Microsoft Corporation Standard Edition on Windows NT 5.0 (Build 2195: Service Pack 4) Unfortunately, there's not much chance of service-packing the server right now, unless we can establish that this is a known bug fixed by |
![]() |
| Thread Tools | |
| Display Modes | |
| |