Global Dynaset and Database Objects 
Author Message
 Global Dynaset and Database Objects

        Hi all, I am writing a database viewer in Vb 3.0 Pro w/Access 2.0.  I
inherited someone elses code for the project and I am now in the process of
fitting the new database structure into the viewer.  
        The old code would constantly recreate dynasets everytime the code
jumped down into a different procedure.  I have created a few global dynasets
with access procedures for them.  Now this works fine for me so far, and it
cuts down on some of the redundent code.  
        My question is this,  What are the drawbacks to using GLOBAL DYNASETS,
and GLOBAL DATABASE OBJECTS?  

BTW:   I create all of the dynasets with the READONLY option.

Thanks a lot!
Later,
                                                                                                -- Chris

"When I die, I want to go peacefully like my grandfather
 Not screaming in terror like his passengers."



Wed, 02 Sep 1998 03:00:00 GMT  
 Global Dynaset and Database Objects
Investigate the .Clone() method

The problem with global recordsets (even read-only ones) is that your
position in the recordset may be disturbed by other parts of the code.
You could use local recordsets, but as you've noticed, these will be
slow to create each time you need them.

By cloning a global recordset as a local variable, then using it
locally, you get both speed and independence between them.



Mon, 07 Sep 1998 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Strange VB problem with global dynaset

2. VB Can't see my Global Dynaset !

3. Global Database Object

4. Defining Global database object

5. Global database object declaration?

6. Global Variables / Global Objects

7. Access Forms collection, App object or Global object of the Parent application

8. Creating a Dynaset object.

9. dynaset object type

10. Using relation object for a dynaset recordset ?

11. Table/Dynaset Object Question!!

12. Table/Dynaset Object Question!

 

 
Powered by phpBB® Forum Software