hi Bernhard,

character-to-date conversions are dependant on your regional settings on the 
sql server. if you try to insert a character-value like '03.12.2004 13:00:00' 
into a datetime-field, sql server tries to convert this value implicitly. your 
german server reads december, 12th while an us-english server understands 
march, 12th BUT PRODUCES NO ERROR - until he doesn't try to insert a 13th 
month, which seems to be the problem on your server.

two solutions might help:

1. set the database language to us-english. you can achieve this by selecting 
the database in enterprise manager, rightclick -> properties. 

2. find the code which tries to insert the (us-formatted) date string into the 
datetime field. read a little bit about the convert command in books online. 
you will find a way to convert date and time strings to correct datetime values 
by using a style-flag like this:

CONVERT ( data_type , expression [ , style ] )

as you might notice, i'm located in germany, too, and I am experiencing the 
same problems with different database applications. we try to use style '120' 
everywhere, which means tho following scheme:

yyyy-mm-dd hh:mi:ss(24h)

hope this helps,

marc


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bernhard 
Buchreiter
Sent: Wednesday, March 16, 2005 7:51 AM
To: [email protected]
Subject: [WhatsUp Forum] Char-Type conversion error

Using: WUP 2005, SP1 (incl. schema update) When I want to view a Report I get 
the following error-message:

//----
Source:'Microsoft OLE DB Provider for ODBC Drivers'
Line:2653  Char:17
Error:0  '[Microsoft][ODBC SQL Server Driver][SQL Server]Bei der Konvertierung 
eines char-Datentyps in einen datetime-Datentyp liegt der datetime-Wert 
au�erhalb des g�ltigen Bereichs.'
----------------v




C:\PROGRA~1\Ipswitch\WHATSU~1\HTML\1033\NmConsole\utility\Sql.inc;78
//------

Any hints?
Bernhard



Please visit http://www.ipswitch.com/support/mailing-lists.html
to be removed from this list.

An Archive of this list is available at:
http://www.mail-archive.com/whatsup_forum%40list.ipswitch.com/

Please visit http://www.ipswitch.com/support/mailing-lists.html
to be removed from this list.

An Archive of this list is available at:
http://www.mail-archive.com/whatsup_forum%40list.ipswitch.com/

Reply via email to