Custom Function Problem/Work Around

Steve Freegard steve.freegard at LBSLTD.CO.UK
Fri Oct 17 15:40:20 IST 2003


Kyle,

Which version of DBI-MySQL are you using??

I've had wierd things happen with MailWatch when using the latest version of
DBD (2.9002), I've found the best version to use is 2.1028.

If you want an example of MySQL connections from MailScanner CustomConfig
mechanism then I suggest you have a look at the MailWatch.pm file that I
supply with MailWatch.

Hope this helps.

Kind regards,
Steve


-----Original Message-----
From: Kyle Harris <lists at TRCINTL.COM>
To: MAILSCANNER at JISCMAIL.AC.UK <MAILSCANNER at JISCMAIL.AC.UK>
Sent: Fri Oct 17 15:31:06 2003
Subject: Custom Function Problem/Work Around

I have a custom function created in the CustomConfig.pm that connects to a
MySql database.  As per the docs, my custom function has three parts
(InitMyFunction, EndMyFunction, and MyFunction).  Per the docs in the
CustomConfig.pm, I have my database connection in the InitMyFunction
section.  I was continuously having problems with queries sometimes
returning the correct answer and sometimes returnning now answer at all.  A
separate Perl script I created for test purposes with the exact same SQL
statement would always return the correct result.

After fighting with it for a while, it occured to me to move the database
connection from the InitMyFunction to the actual function, in this case
MyFunction.  It has not failed since.  The connect statement is exactly the
same as I copied and pasted it.  If I move it back making no other changes,
I get the same sporadic results.

I'm curious if this is a bug and if anyone else has expierenced it?

--
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the sender and delete the message from your mailbox.

This footnote also confirms that this email message has been swept by
MailScanner (www.mailscanner.info) for the presence of computer viruses.



More information about the MailScanner mailing list