Re: Executing a select statement multiple times?
From: Val Mazur (group51a_at_hotmail.com)
Date: 11/09/04
- Next message: Nathan: "Re: ExecuteNonQuery() - Bach SQL Statement execution?"
- Previous message: Dave52: "RE: Microsoft Access versus Programmatic Data Access"
- In reply to: Nathan: "Executing a select statement multiple times?"
- Next in thread: Nathan: "Re: Executing a select statement multiple times?"
- Reply: Nathan: "Re: Executing a select statement multiple times?"
- Messages sorted by: [ date ] [ thread ]
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. >
- Next message: Nathan: "Re: ExecuteNonQuery() - Bach SQL Statement execution?"
- Previous message: Dave52: "RE: Microsoft Access versus Programmatic Data Access"
- In reply to: Nathan: "Executing a select statement multiple times?"
- Next in thread: Nathan: "Re: Executing a select statement multiple times?"
- Reply: Nathan: "Re: Executing a select statement multiple times?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|