Ask a Question related to Microsoft SQL / MS SQL Server, Design and Development.
-
Net #1
Cannot execute dynamic query in stored procedure
Hi,
I'm using ADO.NET to execute a stored proc. The stored proc contains a
dynamic sql which will build the INSERT or UPDATE statement for execution at
the end of the stored proc.
I've a line that does some dummy inserts into a table before executing that
dynamic sql, like
exec ('INSERT INTO....')
exec (@sql)
The line of the INSERT INTO runs fine, but the stored proc just won't
execute the @sql. I tried to run the stored proc in the SQL Query Analyzer
and it works just fine.
Can anyone please help??
TIA.
Brgds,
Janet
Net Guest
-
execute stored procedure
Does anybody know how I can execute one of the system stored procedures from master database. for example this is throwing error: <cfquery... -
Execute permission denied on 'stored procedure' dbo
How to solve the problem from the above topic. I can execute the stored procedure through the web service. I am using Integrated Security connection... -
Problem with execute to make a stored procedure
I have to maintain a piece of code. One of the things that is done is a create procedure: CREATE PROCEDURE PROC_22_ RETURNS(IEXTENSION... -
UNIX-Box slow down while execute stored procedure
Hi, Sorry for my "special english". We are on a DGUX-Box with IDS 7.31 ( 4 P3/700 / 2 GB Mem ) We have a problem with a stored procedure... -
How can I execute a stored procedure in .net?
Hello all, Is there anyone who can tell me how to execute a stored procedure in .net. More detailed, I want to pass some parameters to the... -
Andrew J. Kelly #2
Re: Cannot execute dynamic query in stored procedure
can you post the actual sp?
--
Andrew J. Kelly
SQL Server MVP
"Net" <bbahiru@mail.hongkong.com> wrote in message
news:ebRGHomQDHA.2320@TK2MSFTNGP12.phx.gbl...at> Hi,
>
> I'm using ADO.NET to execute a stored proc. The stored proc contains a
> dynamic sql which will build the INSERT or UPDATE statement for executionthat> the end of the stored proc.
>
> I've a line that does some dummy inserts into a table before executingAnalyzer> dynamic sql, like
>
> exec ('INSERT INTO....')
> exec (@sql)
>
> The line of the INSERT INTO runs fine, but the stored proc just won't
> execute the @sql. I tried to run the stored proc in the SQL Query> and it works just fine.
>
> Can anyone please help??
>
> TIA.
>
> Brgds,
> Janet
>
>
>
>
>
Andrew J. Kelly Guest



Reply With Quote

