Re: Problems with carating Stored Procedure from ADO
From: Aaron [SQL Server MVP] (ten.xoc_at_dnartreb.noraa)
Date: 11/08/04
- Next message: Bonato Pierantonio: "Re: SQL 2000 Database on NAS"
- Previous message: Doron Hadar: "Re: Slow UPDATE and DELETE on SQL Server 2000"
- In reply to: Dmitry: "Problems with carating Stored Procedure from ADO"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 8 Nov 2004 10:16:44 -0500
Please don't multi-post. And stop using a Sybase provider if you're
connecting to SQL Server! http://www.aspfaq.com/2126
"Dmitry" <Savtchin@st.by> wrote in message
news:u2irvPaxEHA.3096@TK2MSFTNGP14.phx.gbl...
> 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
> /**********************************************************
> @ID_MESS - message
> @SwiftOperType - operation
> @IsAction - action or rollback?
>
>
> *********************************************************/
> 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
>
> /*BIS aaieianeee */
> 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
> /*BIS iaeiae*/
> 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
> */
> /*BIS eeeaioneee*/
> /*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...
>
>
- Next message: Bonato Pierantonio: "Re: SQL 2000 Database on NAS"
- Previous message: Doron Hadar: "Re: Slow UPDATE and DELETE on SQL Server 2000"
- In reply to: Dmitry: "Problems with carating Stored Procedure from ADO"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|