Re: How to Set Datetime on SQL 2000 server



Hi, Tibor and Sebastian

Thanks very much for the reply. The solutions sound quite interesting. I
took a good read. But they seems too complicated for me. It is a ASP site
with quite a lots of pages. It will take quite a while to update all pages.

I copied the whole site on another Windows 2003 server with IIS 6 enabled.
Since nothing changed, the site on the new server still links to the same SQL
DB. The asp pages on this new server works fine with all date data. I
checked, both server logon as network service and domain account, regional
settings are both Australian format. The only difference is the current
server is a DC and the new server is a domain server.

As you said, the SET DATETIME is per session base which can't be fixed by
changing SQL configuration. That means I still have to change all asp pages.

Can we find the solution from the regional settings? P.S. the new server is
for test only, I need to uninstall IIS after the testing.

I appreciate your help.

Cheers,

Yuggie

"Tibor Karaszi" wrote:

I suggest you fix the app so it uses parameterized queries and you won't have this problem. Or at
least pass language neutral datetime formats to SQL Server
(http://www.karaszi.com/SQLServer/info_datetime.asp).

If above can't be done, then you can make sure that the login used by the app has a language with
the desired format (see sp_defaultlanguage and sp_helplanguage).

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi


"Yuggie" <Yuggie@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:355DCF6B-C394-405A-8B2D-4D882345A7B1@xxxxxxxxxxxxxxxx
Hi, everyone,

I have a intranet base on asp language. The site used a SQL 2000 DB on
Windows 2000 server.

I recently migrate the intranet on a Windows 2003 server(Australian region
settings), but still use the SQL server on the old Win2000 box. I found out
when a user key in a date on the intranet like 15/10/2007, the value can not
be saved to the SQL server because SQL read it in US format(mmddyyyy). I then
migrated the SQL server into the same Win2003 server box. The error can't be
fixed.

I compared both Win2000 and Win2003, they both are Australian date format. I
did some googling,quite a lot of people recommend using a command "SET
DATETIME dmy" to fix it. The default datetime format in SQL is US format
type. The value of the date in current SQL table is date type and 8 digits in
length.

Since I only have a little knowledge on SQL server and asp language. I need
to make change on the intranet as less as possible. So I used this method.
But I don't know where and how to apply this settings. I ran a query analyzer
and keyed in the command like:

SET DATETIME dmy
GO

It didn't report any error but couldn't fix the error.

Could anyone give me the instruction please?

Thanks for your time!

Yuggie

.



Relevant Pages

  • Re: Adp to asp web page
    ... of drunk retards that dont understand web development ... when I went into the connection box, it listed my server but in the drop ... Access ADP is merely front end app and IDE for SQL Server, ... ASP is old technology and different from ASP.NET. ...
    (microsoft.public.access.adp.sqlserver)
  • Re: What is the difference between php & asp?
    ... >ASP is a Microsoft product based on the very ackward Visual Basic syntax ... >PHP is a C-Like, ... >need to physically register on the server. ... It works fine with SQL Server and Access if you really really ...
    (alt.php)
  • Cluster questions
    ... I need to install a portal infrastructure that was developed with ASP ... and SQL Server. ... Virtual Server), like NLB. ... The developement of the ASP application is different that the ...
    (microsoft.public.sqlserver.clustering)
  • RE: SBS 2003 Unable to connect to database STS_Config
    ... Uninstall the SQL server from the SBS 2k3 server from add/remove programs ... Uninstall Microsoft SQL Server Desktop Engine (SHAREPOINT) ... If AV software install any extra IIS virtual directory, ...
    (microsoft.public.windows.server.sbs)
  • Re: Memory issues with 64-bit SQL Server 2005 on 64-bit Win 2003 C
    ... I also checked the individual patch levels for the .NET drivers, SQL Server ... The SQL Server is fully patched, however Windows Update reported that the OS ... Lock pages in memory -- I guess you might have taken care of it as well. ...
    (microsoft.public.sqlserver.clustering)