Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a stored procedure like this:
Create Procedure [sp_checkitem] (@Cname [varchar](50), @Dname [varchar](50), @CID [int] OUTPUT ) AS Set @CID = (Select CatID from [sdb].[dbo].[vw_Categories] WHERE Category=@Cname AND Domain = @Dname) GO AND have this in my excel VB NOTE THAT I ALSO TRIED adParamReturnValue ..... dim comm as ADODB.Command dim CaID as Integer comm.ActiveConnection = con with comm .Parameters.Refresh .Parameters.Append .Parameters.CreateParameter("@Cname", adVarChar, adParamInputOutput, 50, "History") .Parameters.Append .Parameters.CreateParameter("@Dname", adVarChar, adParamInputOutput, 50, "bicycle") .Parameters.Append .Parameters.CreateParameter("@CID", adInteger, adParamInputOutput, , CaID) end with comm.Execute .... BUT I CaID is unchanged. Executing the select statement in Query Analizer gets me the the right number. Where did I go wrong? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Data return from SQL Stored procedure... | Excel Discussion (Misc queries) | |||
Return a stored procedure value to Excel | Excel Programming | |||
Extract data from Stored procedure | Excel Discussion (Misc queries) | |||
Importing Data from a Stored Procedure (SQL SErver) | Excel Programming | |||
How can I grab data from a SQL Server stored procedure | Excel Programming |