strange results when calling a sql stored proc from within an Access2000 project

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Psychobudgie

    strange results when calling a sql stored proc from within an Access2000 project

    Hi,

    I have written a stored procedure which includes a DATEPART command, i.e.

    DATEPART(weekda y, <date>)

    The result when ran from SQL Query Analyser is as expected . i.e. Sunday
    returns 1, Monday 2, etc

    When the same proc is called from within the Access 2000 project Sunday
    is returned as 7, Saturday as 6 instead of 1 and 7 respectively.
    Basically the same stored proc returns different data depending on from
    where it has been called.

    This is causing some issues obviously as the resulting tables and
    reports are showing incorrect data when presented in Access 2000.

    Has anyone else experienced this before or have any idea what may cause it.

    Regards,

    PB
  • Ð

    #2
    Re: strange results when calling a sql stored proc from within an Access 2000 project

    >From online help:

    Remarks
    Use the @@DATEFIRST function to see the current setting of SET
    DATEFIRST.

    The setting of SET DATEFIRST is set at execute or run time and not at
    parse time.

    Comment

    Working...