Sync errors

Nov 18, 2009 at 5:11 PM

  Hello,

  I installed SLAM, configured id (seems to be ok), but I get no updates at the SQL tables. The Synchronize button returns ok, until this part:

System.Data.SqlClient.SqlException: Incorrect syntax near '2'. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult) at System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries) at System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query) at System.Data.Linq.DataContext.ExecuteMethodCall(Object instance, MethodInfo methodInfo, Object[] parameters) at System.Data.Linq.DataContext.ExecuteCommand(String command, Object[] parameters) at AWS.SLAM.Data.SqlDataRepository.UpdateItem(String tableSchema, String tableName, String id, Hashtable values) at AWS.SLAM.Data.SqlDataServices.Update(String typeName, String id, Hashtable values) at AWS.SLAM.Events.ListItemUpdater.Update(SPListItem listItem)

After this one, I get another error:

System.ArgumentException: Value does not fall within the expected range. at Microsoft.SharePoint.SPFieldMap.GetColumnNumber(String strFieldName) at Microsoft.SharePoint.SPListItemCollection.GetRawValue(String fieldname, Int32 iIndex) at Microsoft.SharePoint.SPListItem.GetValue(SPField fld, Int32 columnNumber, Boolean bRaw) at Microsoft.SharePoint.SPListItem.GetValue(String strName, Boolean bThrowException) at Microsoft.SharePoint.SPListItem.GetValue(String strName) at Microsoft.SharePoint.SPListItem.get_Item(String fieldName) at AWS.SLAM.Events.ListItemUpdater.Update(SPListItem listItem).

  Any ideas?

Thanks a lot

 

 

Information Data Synchronization Processing: Orçamento por categoria
18/11/2009 14:43:16 Exception System.Data.SqlClient.SqlException: Incorrect syntax near '2'. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult) at System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries) at System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query) at System.Data.Linq.DataContext.ExecuteMethodCall(Object instance, MethodInfo methodInfo, Object[] parameters) at System.Data.Linq.DataContext.ExecuteCommand(String command, Object[] parameters) at AWS.SLAM.Data.SqlDataRepository.UpdateItem(String tableSchema, String tableName, String id, Hashtable values) at AWS.SLAM.Data.SqlDataServices.Update(String typeName, String id, Hashtable values) at AWS.SLAM.Events.ListItemUpdater.Update(SPListItem listItem)
Developer
Nov 18, 2009 at 5:20 PM

To your SharePoint web.config add:

<system.diagnostics>
    <switches>
      <add name="SLAMLogger" value="4" />
    </switches>
  </system.diagnostics>

At the same level as appSettings.

Save an item again (or run sync as you did).  With that switch set it will log many more information messages.  The SQL it is trying to execute should be in the message previous to the exception, so you can see just what the problem is.

 

-Brian

corc-admin.aws-stage.com
Nov 19, 2009 at 4:32 PM

Hello Brian,

 

Thank you for the help, but I haven´t succeded yet. What I did...

1. changed the web.config to include the <system.diagnostics>, just after the <system.web>;

2. Restarted the machine

3. Runned the sync again.

The message I got was this one:

System.ArgumentException: Value does not fall within the expected range. at Microsoft.SharePoint.SPFieldMap.GetColumnNumber(String strFieldName) at Microsoft.SharePoint.SPListItemCollection.GetRawValue(String fieldname, Int32 iIndex) at Microsoft.SharePoint.SPListItem.GetValue(SPField fld, Int32 columnNumber, Boolean bRaw) at Microsoft.SharePoint.SPListItem.GetValue(String strName, Boolean bThrowException) at Microsoft.SharePoint.SPListItem.GetValue(String strName) at Microsoft.SharePoint.SPListItem.get_Item(String fieldName) at AWS.SLAM.Events.ListItemUpdater.Update(SPListItem listItem)

Could it be some error with the column/SQL types I mapped?

Thanks

Nov 19, 2009 at 4:36 PM

Woops, my mistake. Just got new info:

 

Date Type Message
19/11/2009 15:34:47 Information Data Synchronization Complete
19/11/2009 15:34:47 Information Data Synchronization Processing: Pontos de controle
19/11/2009 15:34:47 Information Number of items removed from PontoControle_Departamento: 0
19/11/2009 15:34:46 Information Number of items removed from Pontosdecontrole: 0
19/11/2009 15:34:46 Exception System.ArgumentException: Value does not fall within the expected range. at Microsoft.SharePoint.SPFieldMap.GetColumnNumber(String strFieldName) at Microsoft.SharePoint.SPListItemCollection.GetRawValue(String fieldname, Int32 iIndex) at Microsoft.SharePoint.SPListItem.GetValue(SPField fld, Int32 columnNumber, Boolean bRaw) at Microsoft.SharePoint.SPListItem.GetValue(String strName, Boolean bThrowException) at Microsoft.SharePoint.SPListItem.GetValue(String strName) at Microsoft.SharePoint.SPListItem.get_Item(String fieldName) at AWS.SLAM.Events.ListItemUpdater.Update(SPListItem listItem)
19/11/2009 15:34:46 Information Update LI Delete Associations - For: Pontos de controle Type: PontoControle_Departamento
19/11/2009 15:34:46 Information Update LI Associations - Pontos de controle List: Pontos de controle ListItem: Capacidade de desempenho e disponibilidade, 3d82fab7-9e12-4dd7-96e1-8379f1d34fec
19/11/2009 15:34:46 Information Update LI Complete - Pontos de controle List: Pontos de controle ListItem: Capacidade de desempenho e disponibilidade, 3d82fab7-9e12-4dd7-96e1-8379f1d34fec
19/11/2009 15:34:46 Information Update Item: update SLAM.Pontosdecontrole set [ListItemID] = '3d82fab7-9e12-4dd7-96e1-8379f1d34fec',[ListID] = 'f62f5721-a979-42d2-9f55-4b2bc272aad3',[ListRelativeID] = 110,[ID] = 110,[Ponto] = 'Capacidade de desempenho e disponibilidade',[Descriçãodoponto] = 'O Participante deve monitorar preventivamente a capacidade, o desempenho e a disponibilidade da rede e canais de comunicação, dos sistemas, dos servidores e do banco de dados, de forma a manter a continuidade e o bom funcionamento dos negócios.',[Periodicidade] = 'mensal',[Datadepróximasolicitação] = convert(datetime, '12/01/2009 03:00:00', 101),[Responsável] = '282;#LINKCORRETORA\ssoliveira',[Validador] = '65;#LINKCORRETORA\laoliveira' where ListItemID = '3d82fab7-9e12-4dd7-96e1-8379f1d34fec'
19/11/2009 15:34:46 Information Update LI Start - Pontos de controle List: Pontos de controle ListItem: Capacidade de desempenho e disponibilidade, 3d82fab7-9e12-4dd7-96e1-8379f1d34fec
Developer
Nov 19, 2009 at 4:36 PM

When you validate (in the SLAM config), do all types match?  Do you get an error just on sync or do you get it when you edit a list item too?

Nov 19, 2009 at 4:42 PM

Hi,

I just got this error on sync, when editing it´s fine:

19/11/2009 15:41:43 Information Update LI Associations Complete - Departamentos List: Departamentos ListItem: Diretoria Executiva, bdd8bbc9-0f55-424e-bdd2-567fa6ddcb6f
19/11/2009 15:41:43 Information Update LI Delete Associations - For: Departamentos Type: Departamento_Pai
19/11/2009 15:41:43 Information Update LI Delete Associations - For: Departamentos Type: Departamento_Gestor
19/11/2009 15:41:43 Information Update LI Associations - Departamentos List: Departamentos ListItem: Diretoria Executiva, bdd8bbc9-0f55-424e-bdd2-567fa6ddcb6f
19/11/2009 15:41:43 Information Update LI Complete - Departamentos List: Departamentos ListItem: Diretoria Executiva, bdd8bbc9-0f55-424e-bdd2-567fa6ddcb6f
19/11/2009 15:41:43 Information Update Item: update SLAM.Departamentos set [ListItemID] = 'bdd8bbc9-0f55-424e-bdd2-567fa6ddcb6f',[ListID] = 'c811ffb8-9a3c-4fc2-8573-ca4360aba72d',[ListRelativeID] = 37,[ID] = 37,[Nomedodepartamento] = 'Diretoria Executiva' where ListItemID = 'bdd8bbc9-0f55-424e-bdd2-567fa6ddcb6f'
19/11/2009 15:41:43 Information Update LI Start - Departamentos List: Departamentos ListItem: Diretoria Executiva, bdd8bbc9-0f55-424e-bdd2-567fa6ddcb6f

Thanks