This project is read-only.

Error on Activate control Panel Datetime conversion

Jun 26, 2009 at 3:39 PM

Hi all, i've installed the last version of Slam on wss 3.0 sp2, i've the italian version of SQL, OS and Wss, when i tried to activate SLAM i received thi error related on date conversion :

Logging error: insert into SLAM.SLAMMessageLog select convert(datetime, '06/26/2009 16.21.33', 101), 'Information', 'Trace Level: Error'
System.Data.SqlClient.SqlException: La conversione del tipo di dati da char a datetime ha generato un valore di tipo datetime non compreso nell'intervallo dei valori consentiti.
L'istruzione è stata interrotta.
   in System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   in System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
   in System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
   in System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   in System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
   in System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
   in System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   in System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult)
   in System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries)
   in System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query)
   in System.Data.Linq.DataContext.ExecuteMethodCall(Object instance, MethodInfo methodInfo, Object[] parameters)
   in System.Data.Linq.DataContext.ExecuteCommand(String command, Object[] parameters)
   in AWS.SLAM.Data.SqlLogDataRepository.LogMessage(String tableSchema, String messageType, String message)


The date field in SP  shows the date in the Italian date format (DD-MM-YYYY).

When I do the synchronization, it places the date in the format MM-DD-YYYY.

My SLAM's DB collation is the Italian collation SQL_Latin1_General_CP1_CI_AS

Can you help me ? My version of Slam control pane is


Jul 6, 2009 at 6:17 PM

Interestingly the form you see should overcome this conversion issue.  But the date is not formatted as I would expect.  What SLAM is doing to overcome conversion issues is first format the date as "MM/dd/yyyy HH:mm:ss" inside of a convert statement, as you see, specifying the format such that it can cast it to a datetime.  Once cast, it will be saved in your database in whatever format is your default format.  The problem is that the string to be cast is not in the expected format.  The code formatting the date as a string in this manner is fairly straight-forward, as it is doing DateTime.Now.ToString("MM/dd/yyyy HH:mm:ss").  That can only mean that form "MM/dd/yyyy HH:mm:ss" is actually resulting in "MM/dd/yyyy" in your environment.  We need to figure out whether there is better way around this issue.