|
|
|
|
|
|
|
|
|
|
|
|
|
|
Build your own database analysis tool (continued)
'--Do a magical bubble sort to sort the forms according to their titles
Dim top, bot, cur, cur2 As Integer
top = Ubound(formArray)
bot = Lbound(formArray)
Dim tmp_element As Variant
For cur = bot To top
cur2 = cur
Do While cur2 > bot '--bubble up
If(formArray(cur2) > formArray(cur2-1)) Then
Exit Do
Else
'--swap
tmp_element = formArray(cur2)
formArray(cur2) = formArray(cur2-1)
formArray(cur2-1) = tmp_element
End If
cur2 = cur2-1
Loop
Next
'--This ends the magical bubble sort. Do you feel freshly percolated?
|
[Be aware that as sort algorithms go, the bubble sort is among the very slowest. If you are sorting a hundred elements or so, the bubble sort won't make your brain bubble. But if you're planning on sorting much larger amounts of data, consider at the very least using a "shell sort" or "quicksort" algorithm. -- DG]
Analyze This (view) Now that you have detailed information about the databases on your system, you can set up views to help you sort through that information and organize it in a meaningful way. I've created views that show the title, the file name, the size and even the number of forms, views and agents in each of them. In Figure C, you can see an example of how I've sorted all of the database information documents by the size of the database.
FIGURE C
 
Sorting by size helps you figure out what databases are hogging your hard drive. Roll over picture for a larger image.
Other possible uses You can use the agent as-is or you can use it as a starting point for similar applications. Here are some ideas I have for other uses for this agent.
- Make this a scheduled agent that runs weekly and deletes the old reports. This way you will always have fairly fresh information.
- Create an email agent that emails you a weekly report containing either the top-level information on all databases or details about a select number of databases that you are in charge of.
- Just steal the magical bubble sort routine. I guarantee you'll find a use for it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Advertisement --
Learn Notes and Domino 8 at your place and pace!
Learn Notes and Domino in your office and/or home! TLCC's highly acclaimed distance learning courses for users, developers, and admins will enhance your career and your resume.
The many included activities and demos will make you a pro! Expert instructor help is a click away.
Click here to try a FREE demo course!! |
-- Advertisement --
Integrate your Notes Applications with Microsoft Office and Symphony
Integra for Notes Integrates Microsoft Office and/or IBM Lotus Symphony
Requires NO change to the design of the appliation or Installations of DLL's and EXE's
- Integra is a ready to use solution, enhance static reports with Excel data analysis, pivot tables, macros
- User friendly aproach, using a point and click access to features
- Reports from any Lotus Notes databases
- Runs reports through a Notes client, web browser and scheduled basis
- Allows use of LotusScript for advanced data manipulation
- Enables self service reporting capabilities to end-users
Learn more at www.integra4notes.com. |
|
|
|
|
|
|
|
|
|
|