my question is
that is it better to open a recorset with select * from table name
and then filter it based on our requirements
or
open the recordset each time with the required condition.
any ideas or thoughts on this
Printable View
my question is
that is it better to open a recorset with select * from table name
and then filter it based on our requirements
or
open the recordset each time with the required condition.
any ideas or thoughts on this
use where clause
Code:select * from table where field1 = condition
I agree with E-Link because:
If u open a recordset without a where clause then the entire table is open thus increasing load.
Secondly, the filter method takes quite some time.
i just wanted to hear this
filter takes time.
but how do u know this.
please tell me.
i really want to know y and how.
and if we use a contional select statement
and recive 1 or 2 records as per the condition and suppose u issue this command quite often , then does it not reduce ur performance.
bcoz i read that toooo many trips to the server is also not good.
anyway thanks a lot for replying.
hi,
i think it other way around and it may also depend on the data in yr table. i think select * during form loading and then using filter option is quite better method.
bye.
......MSDN.Quote:
Note When you know the data you want to select, it's usually more efficient to open a Recordset with an SQL statement. This example shows how you can create just one Recordset and obtain records from a particular country.
Quote:
When you know the data you want to select, it's usually more efficient to open a Recordset with an SQL statement.
Say if i'm searching on access database table with more than 1 lakh records. everytime i specify criteria and click on search, i know which data to select but making recordset on every search from table containing such large data is not feasible i guess. instead using filter is good enough. i've tried both in the same situation explained above with filter giving better results.
thanks.
No offence intended.:D
Do you mean that even if you dont need the search then to u load the entire table containing more than 1 lakh records?????Quote:
if i'm searching on access database table with more than 1 lakh records. everytime i specify criteria and click on search
if in a particular application i click on search option from the menu, this certainly means that i'm gonna search something. don't yu think so.
and on this search form i intended to open recordset coz during loading of forms users are more patient enough.
thanks.