![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have the following SP PROCEDURE sp_Write_Off_Select (@unique_id [char](15)) AS DECLARE @var1 nvarchar(1) Set @var1 = 'N' SELECT @var1 as include, Table1.* FROM Table1 WHERE Table1.[unique_id] = @unique_id This works fine within Query Analyzer and within an Execute SQL Task but I need to run it within an Activex script. It comes back with an empty recordset when I know there is data. I can get it to work if I take out all references to @var1 variable but I need this in. Any thoughts |
#3
| |||
| |||
|
|
In the Sp can you do SET NOCOUNT ON SELECT 'N' as include, Table1.* FROM Table1 WHERE Table1.[unique_id] = @unique_id Are you sure you are in the correct database on the right server.? -- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.allisonmitchell.com - Expert SQL Server Consultancy. www.SQLDTS.com - The site for all your DTS needs. I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "Spud_Monkey" <spudmonkey (AT) aol (DOT) co> wrote in message news:eRK8CwS0DHA.2752 (AT) TK2MSFTNGP09 (DOT) phx.gbl... I have the following SP PROCEDURE sp_Write_Off_Select (@unique_id [char](15)) AS DECLARE @var1 nvarchar(1) Set @var1 = 'N' SELECT @var1 as include, Table1.* FROM Table1 WHERE Table1.[unique_id] = @unique_id This works fine within Query Analyzer and within an Execute SQL Task but I need to run it within an Activex script. It comes back with an empty recordset when I know there is data. I can get it to work if I take out all references to @var1 variable but I need this in. Any thoughts |
![]() |
| Thread Tools | |
| Display Modes | |
| |