Best way to call a stored procedure

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: mike (decxor1_at_-NOSPAM-hotmail.com)
Date: 06/16/04


Date: Wed, 16 Jun 2004 10:04:27 -0700

Hi

There are two ways to execute a stored procedure using ADO.NET
- call "exec sp_myproc val1,val2" statement over ADO SqlCommand myCommand = new SqlCommand(SQLQuery, mySqlConnection);
- use Command/Parameters objects to initialize and call the stored procedure.

Which is a efficient way and why

Appreciate your response

Thanks
Mike

---
Posted using Wimdows.net Newsgroups - http://www.wimdows.net/newsgroups/


Relevant Pages

  • Best way to call a stored procedure
    ... There are two ways to execute a stored procedure using ADO.NET ... use Command/Parameters objects to initialize and call the stored procedure. ...
    (microsoft.public.dotnet.languages.csharp)
  • RE: SQL stored procedure executing twice
    ... I wasn't aware that DLookupwould execute the "domain" more than once. ... caused the stored procedure to execute twice. ... Dim stDocName As String ... My pass-thru query properties ...
    (microsoft.public.access.modulesdaovba)
  • Re: SQLserver and the WHERE x IN y
    ... to a stored procedure - that would only work if you introduced subtyping into ... the temp table from the calling procedure (the temp table is still in scope, ... INSERT INTO #MyTempTable EXECUTE YourPopulateProc 123 ... INSERT INTO @MyTableVar VALUES ...
    (microsoft.public.sqlserver.programming)
  • RE: SQL stored procedure executing twice
    ... caused the stored procedure to execute twice. ... from one parent record to another. ... Dim stDocName As String ... The table tempCount does not change until I execute the VBA code line: ...
    (microsoft.public.access.modulesdaovba)
  • Re: pass stored procedure parameters in asp
    ... you can use the EXECUTE AS statement to test the ... procedure and properties) of voidTran stored procedure and other ... This email account is my spam trap ...
    (microsoft.public.inetserver.asp.general)