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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

which is better

Status
Not open for further replies.

TRYP

Programmer
Jun 20, 2000
136
US
in a routine i have to fill a listbox with the contents of a text property of an object X.

i get this object from a method call to another object Y.

i have to re-get from Y in order to iterate through the count of X's in Y.

so far i have tried 2 methods of filling the listbox:

1.) looping through the obj's and building a semi-colon delimited string and passing it to the listbox as a rowsource with the rowSourcetype set to Table/Query and finally requerying the listbox. This errors when a value string contains a comma...Access sees it as an alternate delimiter (?) and splits the string into 2 separate rows.
Errrrrrrrrrrrrrrrrrr.

2.) in the loop i append to a temp table i created then query the table and assign it to the listbox which works well (data issues aside..lol). My concearn with this method is the overhead of creating the table and querying it deleting it everytime i need to use the routine.

Advice ? ? Help!

Tryp


 
Well, for a degree of elegance and finesse, my preference would be 1 because i hate creating unecessary excess tables……but……..very big but…….

I favor method 2 for two reasons:

1) primary reason: it’s easier.
2) Secondary reason of greater import it is easier to debug and expand upon.

So, the only problem we are left to deal with is that disgusting database bloat you are now experiencing.

I have some routines remarkably similar to what you are attempting to do and I use method 2 simply because it works very well.

Now, about that database bloat.

The truth is I have 3 applications which work with this concept and all three databases use a unique table specific to their needs and all 3 share the same database. So what we have is a database which I call merde.mdb which consists of structures of work tables. Each db that needs one or more of these tables builds the table rows, have either queries already attached to those tables or builds them in code, but, most importantly all scratch table manipulation is made to the merde.mdb. When I am through with the merde I run queries against the appropriate scratch table(s) and purge them.
At the end of the application routines I compact merde.mdb.

Not very elegant, but it works very well and my real application database does not bloat.
Robert Berman
Data Base consultant
Vulcan Software Services
thornmastr@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top