Re: Problem with execution

From: John Bell (jbellnewsposts_at_hotmail.com)
Date: 10/25/04


Date: Mon, 25 Oct 2004 13:03:11 +0100

Hi

You don't say if it just hangs (in which case you are probably blocked) or
if you get an error message. You may want to use TRUNCATE instead of delete
if you wish to delete everything from the table.
It may also be an idea to put this in a transaction and add error handling
(see @@ERROR in Books online).

John
"Johny" <goky2002@beograd.com> wrote in message
news:uGbIJPouEHA.1420@TK2MSFTNGP10.phx.gbl...
> have Stored procedure spAdmin_Do And I try to execute it from application
(I
> can execute it from Query Analyzer).
> 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
>
>
>



Relevant Pages

  • Re: blue screen
    ... Enquire, plan and execute ... Background information on Stop Error message ...
    (microsoft.public.windowsxp.general)
  • RE: Need Help on Define Names
    ... The error message is "Compile error: ... are in the workbook, execute the rest of code. ... Dim NameMatch As Boolean ...
    (microsoft.public.excel.programming)
  • Re: Removing and event from the html code.
    ... Like I said earlier I inherited this script with the page. ... Actually I don't get an error message, ... > This assigns the *result* of running countdown to window.onload. ... window.onload won't execute until the page has fully loaded. ...
    (comp.lang.javascript)
  • Re: LaTeX2rtf not running
    ... Cannot execute C:\PROGRA~1\LATEX2RTF\LATEX2RT.EXE ... Please cite exactly the complete error message ... probably related to window, not to latex2rtf. ...
    (comp.text.tex)
  • Re: How to have SQL_ERROR returned from RAISERROR within IF-BLOCK
    ... The problem has been fixed in SQL Server 2005. ... even modify the sequence of ODBC function calls and checking of the return ... I want to return SQL_ERROR to my application with a custom error message ... I get it returned fine when I execute the following statement using ...
    (microsoft.public.data.odbc)