This project is read-only.

Slam activation error message

Oct 16, 2009 at 3:46 PM


i've this error when i try to click on activate button (configure and diagnostic tell me no errors)


Logging error: insert into SLAM.SLAMMessageLog select convert(datetime, '10/16/2009 16.45.34', 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.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)

Oct 16, 2009 at 4:42 PM

So this one has perplexed us for a while.  We had resolved this issue related to culture date formats, but it doesn't seem to stick for Italian.  So right now when SLAM writes a date it does an explicit ToString with the format "MM/dd/yyyy HH:mm:ss", which gets passed into a SQL statement that you see in the exception, so it does a convert(datetime, '[datestring]', 101) on the SQL side which just makes sure there is parity culture-wise between what the front-end is giving to the database and what the database expects.  Doing it this way also allows for SLAM not to care whether the SharePoint server and database server are the same cultures.  But when the culture is it-IT, or so far we have seen, a format of "MM/dd/yyyy HH:mm:ss" apparently outputs "MM/dd/yyyy" as evidenced in the exception here.  And then I came across this:

Which evidently looks like the same issue, and unfortunately this Carl Daniel, an MVP, supposes it's a bug (in the Framework).  So if it seems like we've been dragging our feet on this one it's because until now it was just perplexing since it is known to work for many other cultures without issue, and it appears to be Italian specific.  If it is a bug in the Framework, then we can see if there is an alternative that might really work for all cultures.  Maybe using another format other than "101" as the common format SLAM passes around will not be a problem, such as one that already uses "." instead of ":". 

Mar 22, 2010 at 6:39 PM


I've the same issue,

do you have some news, or some workaround?

Many thanks