f



I'm Looking for code that will populate a database with 500,000 junk docs to test dblookup speed? Any Idea what the code might look Like TIA

I'm Looking for code that will populate a database with 500,000 junk docs to test dblookup speed? Any Idea what the code might look Like TIA


0
meak
10/25/2003 12:00:23 PM
comp.lotus-notes.programmer 2966 articles. 0 followers. Post Follow

1 Replies
395 Views

Similar Articles

[PageSpeed] 2

Off the top of my head with no testing:

Create an agent. Run from Actions Menu.

Sub Initialize
	Dim ns        As New NotesSession
	Dim dbCurrent As NotesDatabase
	Dim docJunk   As NotesDocument
	
	Dim SomeValue As Variant
	Dim x         As Long
	
	Set dbCurrent = ns.CurrentDatabase
	
	For x = 1 To 500000
		Set docJunk = dbCurrent.CreateDocument
		
		' Set some fields on the document before saving it.
		Call docJunk.ReplaceItemValue( "Form", "YourFormName" )
		SomeValue = ""  ' Or what have you...
		Call docJunk.ReplaceItemValue( "SomeOtherField", SomeValue )
		' Continue for other fields you want to set.
		
		Call docJunk.Save( True, True, True )
	Next x
End Sub

Use at your own risk. Should get you started.

-- Grant


<-=meak=-@ammy.com.invalid> wrote in
news:rBtmb.41798$h47.40141@bignews4.bellsouth.net: 

> I'm Looking for code that will populate a database with 500,000 junk
> docs to test dblookup speed? Any Idea what the code might look Like
> TIA 
> 
> 

0
Grant
10/29/2003 1:35:30 AM
Reply: