Re: Problems with carating Stored Procedure from ADO

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Aaron [SQL Server MVP] (ten.xoc_at_dnartreb.noraa)
Date: 11/08/04


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...
>
>



Relevant Pages

  • MS Access Query Question
    ... I'm connecting me over a VisualBasic programm over ADO on an Access-DB. ... So, when i start a query with sql, often ...
    (microsoft.public.data.ado)
  • Re: Problems with creating Stored Procedure from ADO
    ... Obviously you've created the sproc manually first, and tried to execute from ... > May bee ADO find parametrs in Create query.. ...
    (microsoft.public.sqlserver.programming)
  • LIKE statement in ADO prodices no results
    ... I have a front/end and back/end MS Access databases that I am connecting via ... In the f/e I am issuing a query containing LIKE statement. ... work properly with ADO? ...
    (microsoft.public.access.queries)
  • Re: DAO vs ADO
    ... Depending on how you're connecting to SQL Server, yes, it might make sense ... to use ADO. ... I've written applications where my communication to SQL Server was all done ... DAO was designed specifically for use with Jet databases (i.e.: ...
    (microsoft.public.access.modulesdaovba)
  • Re: Large varchar columns with SQL server
    ... I'm connecting to a SQL ... Did you read the KB articles they pointed to: ... I can also add that since ADO 2.6, if you do get DB_E_ERRORSOCCURRED on ... present than is necessary to demonstrate event handling. ...
    (microsoft.public.data.ado)