🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #1181

Problem with execution

#1181
From: Johny
Date: Fri, 22 Oct 2004 13:17
41 lines
2048 bytes
I have Stored procedure spAdmin_Do And I try to execute it with

adospDo->Close();
            adospDo->ProcedureName = "spAdmin_Do";
            adospDo->Parameters->Clear();
            spparamFilterRequest = adospDo->Parameters->AddParameter();
            spparamFilterRequest->DataType = ftString;
            spparamFilterRequest->Size = 10;
            spparamFilterRequest->Value = asYear;
            adospDo->ExecProc();

 The procedure simply stop at the first EXEC 'delete Do.dbo.Admin_Do' and
don't continue.
 If I delete that line procedure again stop at the first EXEC.

 Is it problem if I have more EXEC in procedure or How can I solve this on
some different way?

The procedure spAdmin_Do:


CREATE PROCEDURE spAdmin_Do
(
 @sFiscalYear  varchar(10)
)
AS
   @sQueryPart1  varchar(1000),
   @sQueryPart2  varchar(1000),
   @sQueryPart3  varchar(1000)

SET @sQueryPart1 = " Some query "
SET @sQueryPart2 = " Some query "
SET @sQueryPart3 = " Some query "

SET DATEFORMAT dmy
Exec ('delete Do.dbo.Admin_Do')
EXEC(@sQueryPart1)

EXEC(@sQueryPart2)
EXEC(@sQueryPart3)
GO
Technical Details
Message-ID: <41790922@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.wiretrip.org!border2.nntp.ams.giganews.com!nntp.giganews.com!newsfeed.wirehub.nl!194.72.7.126.MISMATCH!news-peer-test!btnet!newsfeed.bt.es!195.5.65.34.MISMATCH!caladan.arrakis.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,3b689257544e69c9,start
X-Google-Attributes: gid10698b,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Johny" <goky2002@beograd.com>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: Problem with execution
Date: Fri, 22 Oct 2004 15:17:29 +0200
Lines: 45
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 213.137.120.73
Message-ID: <41790922@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1098451234 213.137.120.73 (22 Oct 2004 06:20:34 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.wiretrip.org!border2.nntp.ams.giganews.com!nntp.giganews.com!newsfeed.wirehub.nl!194.72.7.126.MISMATCH!news-peer-test!btnet!newsfeed.bt.es!195.5.65.34.MISMATCH!caladan.arrakis.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail