Groups | Blog | Home
all groups > sql server odbc > november 2004 >

sql server odbc : Problems with carating Stored Procedure from ADO


Michael Thomas (Microsoft)
11/8/2004 12:00:08 PM
You need to bind to the return parameter.

Michael

[quoted text, click to view]

Dmitry
11/8/2004 4:43:33 PM
Hi

I try to create SP from ADO. Open connection and excecute queries.

con.Execute "SET QUOTED_IDENTIFIER OFF "
con.Execute "SET ansinull ON"

con.Execute TextProc

TextProc content
"
create procedure BISSGetDllName (
@ID_MESS numeric(10) = 0,
@SwiftOperType int = 0,
@IsAction int=1
) as
Begin

declare
@ret int,
@MessageType int,
@AccBalance1 int,
@urgency varchar(1)
select
@MessageType = MessageType
from BISSHead
where ID_MESS = @ID_MESS

select @urgency='s'
from BISSMess
where
ID_MESS=@ID_MESS and
NumOfField='203B' and
convert(int,ContextOfField)=1

if @MessageType= 202
begin
if exists(select 1 from BISSMess where ID_MESS=@ID_MESS and
NumOfField ='58E')
select '_trbis202.dll','TrBIS2202'+@urgency+'NR'
else
select '_trbis202.dll','TrBIS2202'+@urgency
return 1
end
else if @MessageType= 103
begin

declare @IsTax int
exec @ret=BISSIsTax @ID_MESS, @IsTax output
if @ret<>1
return @ret

if @IsTax=1
begin
select '_trbistax.dll','TrBISTax'+@urgency
return 1
end

/*select @AccBalance1 = convert(int,substring(KorrAccount,1,4))
from BISSMessAddition
where ID_MESS = @ID_MESS
*/
/*if exists(select 1
from ReportSetup
where
Code = 29 and
Amount1=0 and
AccBalance1<>@AccBalance1
) */
begin
if exists(select 1 from BISSMess where ID_MESS=@ID_MESS and
NumOfField ='57E')
select '_trbiss100.dll','TrBIS100'+@urgency+'NR'
else
select '_trbiss100.dll','TrBIS100'+@urgency
return 1
end


end
return -1221
end

"

ADO sad [SYBASE][OLE DB Sybase provider]Value has not been specified for
parameter 1.

May bee ADO find parametrs in Create query.. and want values for parametrs.
How could execute this query...


AddThis Social Bookmark Button