set dateformat causes stored procedure recompile

  • It's the end of the day and I've just discovered that a few of my stored procedures recompile every time they are used. It seems that this is due to the statement 'set dateformat dmy'.

    I use this to ensure my stored procedure which uses dates works on both UK and US hosted databases. Does anyone know if I can set this anywhere else to get the same guarantee but without the recompile?

  • Is this handled per user or is exactly how does the SP work? If it is based on user connection then you can change the user login to a specific lanaguage using sp_defaultlanguage.

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply