SET DATEFIRST and ASP.NET

  • Thread starter Thread starter Goofy
  • Start date Start date
G

Goofy

Hi Everyone,

My scenario is that I am writing and application on a server which host
several ASP.NET applications. In my application I would like to use a
function which relies on a custom function which unfortunately is dependent
on the SQL Server's SET DATEFIRST command which sets the first day of the
week for the current session.

The ASPNET account is solely responsible for opening and closing SQL
Connections for example, if I want data from a view, I run a function which
opens the connection gets the data and then closes it. If I issue a SET
DATEFIRST in one function and dont in another, will it get the default in
the second because I closed down the connection. >?
 
Actually, while waiting I have done an experiement. The logic holds true.
Once the connection under which the SET DATEFIRST is used is closed, when a
new connection is re-opened, the default is restored so you can use this
independent of anyone else.
 
Back
Top