Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Three tables, three forms, long upload times

Status
Not open for further replies.

VBpunk

Programmer
Oct 4, 1999
9
0
0
CA
Visit site
Hey all<br><br>I've made an application with 3 one to many related tables.<br>Each table has a feature where One record from a parent <br>table can be selected and exploded tothe related records of<br>a child table.&nbsp;&nbsp;The problem is that each time a form is <br>opened the database and the table have to be reopened.<br>This slows the application down and the performance is <br>degraded.<br><br>Is there a way to speed up my application? Why can't I <br>just open the database once and then reference the<br>tables with a variable. Perhaps I can open the database<br>and all three tables at once and then reference the<br>recordsets in each form with a variable for example.<br><br>DIM rsVariable As Recordset<br><br>Anyone have any suggestions?<br><br>By the way.. I have to have sort, add and delete<br>capabilities in each form for each table.<br>I imagine this removes the possiblity of<br>using dynasets or snapshots.<br><br>Thanks in advance <p>Deryck Ramsahai<br><a href=mailto:DRams.bna@bundy.com>DRams.bna@bundy.com</a><br><a href= > </a><br>It takes two to lie. One to lie and one to listen.
 
<i>the following assumes you don't care about overheads or network traffic.</i><br><br>you can use global objects.<br><br>take out all local prototypes for the connection and recordset objects (<FONT FACE=monospace><b>Dim rs as Recordset</font></b>) in all the forms. you won't need them.<br><br>set the project startup property to Sub Main.<br><br>create a .bas module and add a Sub Main.<br><br>include in the declaration section of this module a public connection object (<b><FONT FACE=monospace>Public con as Connection</font></b>) and three public recordset objects (<b><FONT FACE=monospace>Public rs1 as Recordset</font></b>).<br><br>add a form (splash screen) with distracting animations which creates the global connection and recordset objects (<b><FONT FACE=monospace>Set con = New Connection</font></b>). you can also do this in Sub Main.<br><br>call <b><FONT FACE=monospace>frmSplash.Show vbModal</font></b> in Sub Main before calling your screens. the recordset objects should be available for use in the forms.<br><br>any help?<br> <p>mr s. <;)<br><a href=mailto: > </a><br><a href= > </a><br>why does it never do what is says it does in the manual?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top