Re: Executing a select statement multiple times?

From: Val Mazur (group51a_at_hotmail.com)
Date: 11/09/04


Date: Tue, 9 Nov 2004 18:58:52 -0500

Hi,

If this is the same SQL statement, then you could just load data into
DataSet once and use this data in a multiple places. If you need to execute
different SQL statements but once, then ExecuteReader is a fastest way to do
this. Implementation depends on a design of your application.

-- 
Val Mazur
Microsoft MVP
"Nathan" <Nathan@discussions.microsoft.com> wrote in message 
news:7828E019-33FB-4C50-ABAB-6A9BBE63755A@microsoft.com...
> Hi,
>
> What is the efficient way of executing the database sequence multiple 
> times?
>
> Suppose for example, I have a DB Sequence like this:
> "Select SequenceName.NEXTVAL from TBLName;"
>
> I want to execute this multiple times and populate a collection. How do I
> achieve this efficiently? Do I have to use DataReader multiple times? If 
> so,
> how do I do that?
> There's no support for stored procedures/functions in the DBMS, so I can't
> go that route.
> Any code snippets will help.
>
> Thanks.
> 


Relevant Pages

  • Re: Idea of SQL integration
    ... this issues like compiler directive e.g. ASM. ... is no general solution for multiple DB vendors (sas for multiple ... It gets a SQL statement and another parameter: Open, Execute, ExecuteAndFree. ...
    (borland.public.delphi.non-technical)
  • Re: Insert a New Record
    ... den typing in the relevant SQL statements. ... how can i insert multiple values from multiple textboxes into a new row of ... >You can either use the Execute Method to execute an Append Query / SQL ... >or you can use the AddNew Method of the Recordset object. ...
    (microsoft.public.access.gettingstarted)
  • Re: How do we execute a link server side?
    ... I want to execute a link witch is in JavaScript, ... DID overlap multiple groups, you would do better to use cross-posting ... This email account is my spam trap so I ...
    (microsoft.public.scripting.jscript)
  • Re: i am trying to Execute some command Bar Button but doesnt work [multiposted]
    ... may cause multiple people to respond to your ... > i am trying to Execute some command Bar Button i can change if there ... > COM add-in works i did that in word 2003 and the COM ADD-IN is for Outlook ...
    (microsoft.public.vb.controls)
  • Re: permission magically changed
    ... On 火, 2004-08-31 at 15:13 -0400, Michael E. Webster wrote: ... >> directory and stripping the execute bit. ... I changed it back multiple ...
    (Fedora)