Hi everyone and thanks for the response Jeremy.
I was very worried about this join taking so long.
Really, 60,000 records to join with 30,000 records, both being flat .csv
files, should be
lightening fast. ie. no database load overheads etc...
Although there was a loop in my app to loop thru each record, the code was
NOT stuck in a loop.
So I removed my debugging code which was writting to a log.txt file.
Still no help.
Then I removed the debugging code for DebugAppend for building the
Script.Response (for this section of code).
PROBLEM SOLVED: Now the entire script executes in less than 3 minutes.
Thanks for pointing me to the access objects - I am familiar with them since
I'm a vb programmer.
I was hoping someone would tell me NOT to use the overhead of msaccess on an
which supports email for my company. I suggested 6 months ago that we
should be running agents
on a seperate exchange server. ie. one that does not process email.
If I were to persue this then I would use the creatobject as you recommended
and then fire my standard MSAccess macro
and let msaccess do the rest.
Thanks for that.
Although its been a while I believe the agents.zip you're refering to is
just more vb scripting samples.
I was hoping for souce to the custom script handler written by Microsoft.
I want disect it and learn how to write my own.
Barry G. Sumpter
> Hi Barry,
> Please see my replies inline below.
> > Hi all,
> > I've just finished testing a scripting agent on my development stand
> > alone exchange server. The script saves attachments and needs to join
> > attachment file which has 60,000 records to a file which has 3,000
> > The attachment extract works very quickly. However the join code (open
> > files, read record, write record, read next record, etc..) was running
> > over an hour. So I had to stop the events service.
> > I've just created simple macros in MSAccess to do the same job. The
> > MSAccess macros successfully run in 4 minutes.
> > I'd like to Automate the firing of these MSAccess macros instead of
> > the join code as described above.
> > Is there a way to execute these MSAccess macros from my agent
> > If so, how ? And any example would be appreciated.
> Keep in mind that the script code is being executed on the server, so if
> were to install MS Access on the server you could create an instance of
> Access using the CreateObject call. Once you have an Access object ready,
> use its object model to load the attachment file from disk and merge the
> records into the database of your choice.
> Check out this URL to start becoming familiar with Access objects, their
> methods and properties.
> deovrmicrosoftaccess.htm You may need to copy and paste the URL fragments
> into your browser if your newsreader breaks the line wrapping.
> > Also, I see that the NEW AGENT dialog has an 'Other' tick box under
> > Run the following action - frame.
> > When I click the drop down arrow I see the 'Microsoft Routing Engine
> > Agent'.
> > Does anyone know how to develop an agent like this? I've had a look
> > around and can't seem to find the source code.
> The Microsoft Routing Engine is a custom script handler written by
> that implments the IExchangeEventHandler interface. Check out the
> agents.hlp file for more information.
> > Thanks heaps everyone,
> > Barry G. Sumpter
> Hope this enough to get you started!