P
Patrick P.
Hello,
In an application I'm working on, I use a class in which some member
values are initialized by reading data from an SQL Server-database.
For this to achieve , I have added a procedure to the class constructor
that reads the data. As a result, the same data are read every time the
class is used. The class is used very frequently in the application, so
this leads to an unnecessary amount of database query's.
My question is how I can solve this in a way that the data are read
only one time and that the next times the data are accessed from
memory.
Any ideas?
Thanks a lot.
Patrick Pasteels
In an application I'm working on, I use a class in which some member
values are initialized by reading data from an SQL Server-database.
For this to achieve , I have added a procedure to the class constructor
that reads the data. As a result, the same data are read every time the
class is used. The class is used very frequently in the application, so
this leads to an unnecessary amount of database query's.
My question is how I can solve this in a way that the data are read
only one time and that the next times the data are accessed from
memory.
Any ideas?
Thanks a lot.
Patrick Pasteels