• Hi Flavio,

    Based on that article (http://support.microsoft.com/kb/200299/en), it would seem that your error is a result of bug in a VB library.

    Looking closer at your code, you are using a VB function - DATEDIFF (that have the same name in T-SQL). Perhaps you would like to use SQL code to populate your variable?

    numWeek = datediff("ww",startProject,EndProject) ==>

    PSUEDO:

    int numWeek;

    string s_SQL;

    string s_SQL = "SELECT datediff("ww",startProject,EndProject)";

    numWeek = Execute(s_SQL);

    I'm sorry, but I don't know VB syntax so I've written it in a pseudo syntax of sorts.

    Doing this should avoid the bug in Oleaut32.dll, unless SQL Server is making use of this DLL too? I don't know tha answer to that.

    Seniors, please advise if I am making any mistakes here. Thank you.