|
|
|
|
||||||
| ms.sqlserver.setup Questions about SQL Server. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
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 |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
Yuggie wrote:
> 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 Hi On sql server level you have SET DATEFORMAT dmy but it's per session . if the application is in .net have a look here http://msdn2.microsoft.com/en-us/lib...k1(VS.71).aspx regards SW |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
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_language). -- Tibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://sqlblog.com/blogs/tibor_karaszi "Yuggie" <Yuggie@discussions.microsoft.com> wrote in message news:355DCF6B-C394-405A-8B2D-4D882345A7B1@microsoft.com... > 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 |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
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 . 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_language). > > -- > Tibor Karaszi, SQL Server MVP > http://www.karaszi.com/sqlserver/default.asp > http://sqlblog.com/blogs/tibor_karaszi > > > "Yuggie" <Yuggie@discussions.microsoft.com> wrote in message > news:355DCF6B-C394-405A-8B2D-4D882345A7B1@microsoft.com... > > 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 > |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
Did you change the language for the login in SQL Server you are using?
-- Tibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://sqlblog.com/blogs/tibor_karaszi "Yuggie" <Yuggie@discussions.microsoft.com> wrote in message news:08DACEA0-28C3-453D-A817-5EC52930EBF8@microsoft.com... > 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 . > > 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_language). >> >> -- >> Tibor Karaszi, SQL Server MVP >> http://www.karaszi.com/sqlserver/default.asp >> http://sqlblog.com/blogs/tibor_karaszi >> >> >> "Yuggie" <Yuggie@discussions.microsoft.com> wrote in message >> news:355DCF6B-C394-405A-8B2D-4D882345A7B1@microsoft.com... >> > 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 >> |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
Hi, Tibor
Do you mean the login of Windows server or the login of the SQL (they are on the same box)? I checked the regional settings in Control Panel. Australian format is the only language there. I also checked the check-box of "Apply all settings to the current user account and to default user profile" under the Advanced tag. I may need a reboot to re-fresh this setting in the whole server. However, the current account here is the domain admin account which does affect the local SYSTEM account who runs the iis service. This is a DC so I may have to reboot to safe mode and logon as a local account so that I may change the language settings for the local user SYSTEM. I don't know how to change the logon language for a SQL server account. Did you mean that? Cheers, Yuggie "Tibor Karaszi" wrote: > Did you change the language for the login in SQL Server you are using? > > -- > Tibor Karaszi, SQL Server MVP > http://www.karaszi.com/sqlserver/default.asp > http://sqlblog.com/blogs/tibor_karaszi > > > "Yuggie" <Yuggie@discussions.microsoft.com> wrote in message > news:08DACEA0-28C3-453D-A817-5EC52930EBF8@microsoft.com... > > 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 . > > > > 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_language). > >> > >> -- > >> Tibor Karaszi, SQL Server MVP > >> http://www.karaszi.com/sqlserver/default.asp > >> http://sqlblog.com/blogs/tibor_karaszi > >> > >> > >> "Yuggie" <Yuggie@discussions.microsoft.com> wrote in message > >> news:355DCF6B-C394-405A-8B2D-4D882345A7B1@microsoft.com... > >> > 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 > >> > |
|
|
|
#7 |
|
Messages: n/a
Hébergeur: |
> I don't know how to change the logon language for a SQL server account. Did
> you mean that? Yes, exactly. You asked earlier how you can change SET DATEFORMAT globally. A login carries a default dateformat, so this is where you should work (see sp_defaultlanguage and sp_language). Of course, this gets more complicated if your application formats datetime strings depending on regional settings, since you now are dependent on that as well. For instance: The app constructs a datetime value as a string. If this format is dependent on regional settings for the client machine, you have to take regional settings into account. This has nothing to do with SQL Server, it is all client side. Whatever format the client then submits to SQL Server need to be recognized correctly by SQL Server. This *is* a SQL Server setting, controlled by SET DATEFORMAT, the language of the login etc. You see why you should write you apps to they are language independent? :-) Again, a lot of above is explained in http://www.karaszi.com/SQLServer/info_datetime.asp -- Tibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://sqlblog.com/blogs/tibor_karaszi "Yuggie" <Yuggie@discussions.microsoft.com> wrote in message news:9D89E9EB-B348-4643-8D48-58BA0253AE1C@microsoft.com... > Hi, Tibor > > Do you mean the login of Windows server or the login of the SQL (they are on > the same box)? > > I checked the regional settings in Control Panel. Australian format is the > only language there. I also checked the check-box of "Apply all settings to > the current user account and to default user profile" under the Advanced tag. > I may need a reboot to re-fresh this setting in the whole server. > > However, the current account here is the domain admin account which does > affect the local SYSTEM account who runs the iis service. This is a DC so I > may have to reboot to safe mode and logon as a local account so that I may > change the language settings for the local user SYSTEM. > > I don't know how to change the logon language for a SQL server account. Did > you mean that? > > Cheers, > > Yuggie > > "Tibor Karaszi" wrote: > >> Did you change the language for the login in SQL Server you are using? >> >> -- >> Tibor Karaszi, SQL Server MVP >> http://www.karaszi.com/sqlserver/default.asp >> http://sqlblog.com/blogs/tibor_karaszi >> >> >> "Yuggie" <Yuggie@discussions.microsoft.com> wrote in message >> news:08DACEA0-28C3-453D-A817-5EC52930EBF8@microsoft.com... >> > 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 . >> > >> > 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_language). >> >> >> >> -- >> >> Tibor Karaszi, SQL Server MVP >> >> http://www.karaszi.com/sqlserver/default.asp >> >> http://sqlblog.com/blogs/tibor_karaszi >> >> >> >> >> >> "Yuggie" <Yuggie@discussions.microsoft.com> wrote in message >> >> news:355DCF6B-C394-405A-8B2D-4D882345A7B1@microsoft.com... >> >> > 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 >> >> >> |
|
|
|
#8 |
|
Messages: n/a
Hébergeur: |
Hi, Tibor
Thanks very much for your information. I search with your keyword and found the solution for changing the date format globally. I ran Query Analyzer on the SQL Enterprise Manager and ran: exec sp_defaultlanguage @loginame = 'sql-login' , @language = 'British' Then it set the default login language for this user as British English. I restarted IIS and SQL twice and the settings still worked. So I assume it fix the problem. One more thing I found after I fixed this. The iis/Windows on the old Windows 2000 server and the test 2003 server actually use US date format, even if I set the language as Australian English. Now the SQL server uses British English and the intranet server uses Australian English. They should work together now. Thanks very much for your time and suggestion! Yuggie "Tibor Karaszi" wrote: > > I don't know how to change the logon language for a SQL server account. Did > > you mean that? > > Yes, exactly. You asked earlier how you can change SET DATEFORMAT globally. A login carries a > default dateformat, so this is where you should work (see sp_defaultlanguage and sp_language). > > Of course, this gets more complicated if your application formats datetime strings depending on > regional settings, since you now are dependent on that as well. > > For instance: > The app constructs a datetime value as a string. If this format is dependent on regional settings > for the client machine, you have to take regional settings into account. This has nothing to do with > SQL Server, it is all client side. > > Whatever format the client then submits to SQL Server need to be recognized correctly by SQL Server. > This *is* a SQL Server setting, controlled by SET DATEFORMAT, the language of the login etc. > > You see why you should write you apps to they are language independent? :-) > > Again, a lot of above is explained in http://www.karaszi.com/SQLServer/info_datetime.asp > > -- > Tibor Karaszi, SQL Server MVP > http://www.karaszi.com/sqlserver/default.asp > http://sqlblog.com/blogs/tibor_karaszi > > > "Yuggie" <Yuggie@discussions.microsoft.com> wrote in message > news:9D89E9EB-B348-4643-8D48-58BA0253AE1C@microsoft.com... > > Hi, Tibor > > > > Do you mean the login of Windows server or the login of the SQL (they are on > > the same box)? > > > > I checked the regional settings in Control Panel. Australian format is the > > only language there. I also checked the check-box of "Apply all settings to > > the current user account and to default user profile" under the Advanced tag. > > I may need a reboot to re-fresh this setting in the whole server. > > > > However, the current account here is the domain admin account which does > > affect the local SYSTEM account who runs the iis service. This is a DC so I > > may have to reboot to safe mode and logon as a local account so that I may > > change the language settings for the local user SYSTEM. > > > > I don't know how to change the logon language for a SQL server account. Did > > you mean that? > > > > Cheers, > > > > Yuggie > > > > "Tibor Karaszi" wrote: > > > >> Did you change the language for the login in SQL Server you are using? > >> > >> -- > >> Tibor Karaszi, SQL Server MVP > >> http://www.karaszi.com/sqlserver/default.asp > >> http://sqlblog.com/blogs/tibor_karaszi > >> > >> > >> "Yuggie" <Yuggie@discussions.microsoft.com> wrote in message > >> news:08DACEA0-28C3-453D-A817-5EC52930EBF8@microsoft.com... > >> > 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 . > >> > > >> > 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_language). > >> >> > >> >> -- > >> >> Tibor Karaszi, SQL Server MVP > >> >> http://www.karaszi.com/sqlserver/default.asp > >> >> http://sqlblog.com/blogs/tibor_karaszi > >> >> > >> >> > >> >> "Yuggie" <Yuggie@discussions.microsoft.com> wrote in message > >> >> news:355DCF6B-C394-405A-8B2D-4D882345A7B1@microsoft.com... > >> >> > 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 > >> >> > >> > |
|
![]() |
| Outils de la discussion | |
|
|