I have a SQL Database with an ASP front end.
There are actually two webservers which connect to the SQL database in
London.
i have two questions
1. How can I insert null values when inserting dates within my records. If
gives me a type mismatch error.
2. How will the sql server differentiate that the date coming from UK
webserver example "03/01/2005" is 3rd January 2005 and the same date coming
from US webserver "03/01/2005" is 1st March 2005. Do I need to deal with
this in the ASP code?
Thanks in advance for your help.
RegardsHi,
1. Hope you are using the insert this way: insert into dbo.tablename
(test) values (null)
2. I think you have common SQL server for storing data from US and UK.
Actually, I have one question here - where are you trying to
filter/segregate the data on presentation layer or at the database end?
In case of ASP, since you have 2 webservers, client connecting from
respective location should be able to see their dates according to
their regional settings.
Coming back to SQL Server, I don't think wherein SQL Server can handle
both US and UK date formats in the same column, maybe u have to keep a
constraint say check constraint which will check for a column say
country "US" then use US date format or "UK" then use UK date format..
Hope I got you right on your question..
Regards,
Dilip|||The specifying a date in yyyy/mm/dd format should be interpreted the same
for both US and British. For example: 2005/03/01
"JP SIngh" <none@.none.com> wrote in message
news:Oq7pfo0lFHA.3568@.tk2msftngp13.phx.gbl...
>I have a SQL Database with an ASP front end.
> There are actually two webservers which connect to the SQL database in
> London.
> i have two questions
> 1. How can I insert null values when inserting dates within my records. If
> gives me a type mismatch error.
> 2. How will the sql server differentiate that the date coming from UK
> webserver example "03/01/2005" is 3rd January 2005 and the same date
> coming
> from US webserver "03/01/2005" is 1st March 2005. Do I need to deal with
> this in the ASP code?
> Thanks in advance for your help.
> Regards
>|||"JT" <someone@.microsoft.com> wrote in message
news:OGCNx41lFHA.1416@.TK2MSFTNGP09.phx.gbl...
> The specifying a date in yyyy/mm/dd format should be interpreted the same
> for both US and British. For example: 2005/03/01
No - use a format that is understood regardless of any settings.
http://www.karaszi.com/sqlserver/info_datetime.asp
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment