This project is read-only.

Invalid column name

Jan 21, 2011 at 12:02 PM

Hi

I have just installed SLAM and is trying to use it.

This is my slam.config:

<?xml version="1.0" encoding="utf-8" ?>
<Configuration>
  <ConnectionStrings Default="SLAM">
    <add Name="SLAM" ConnectionString="Database=SLAM;Data Source=.;User Id=SLAM_USER;Password=" />
  </ConnectionStrings>

  <DataMapping DataSchema="SLAM">
    <List Name="Handlingsplaner" ActivationOrder="1">
      <Fields>
        <Field Name="Title" SqlType="varchar(255)" SPType="Text" Required="true"></Field>
      </Fields>
    </List>
    <List Name="Delpunkter" ActivationOrder="2">
      <Fields>
        <Field Name="Title" SqlType="varchar(255)" SPType="Text" Required="true"></Field>
        <Field Name="HandlingsplanNavn" SPType="Lookup" AssociatedList="Handlingsplaner" AssociationName="HandlingsplanToDelpunkter"></Field>
      </Fields>
    </List>
  </DataMapping>
</Configuration>

I get this error:

System.Data.SqlClient.SqlException: Invalid column name 'DelpunkterListItemID'. Invalid column name 'DelpunkterListItemID'. at System.Data.SqlClient.SqlConnection.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.AddAssociationTableSynchronizationObjects(String tableSchema, String tableName, String firstTypeName, String secondTypeName) at AWS.SLAM.Activation.SqlDataSynchronizeTypeProcessor.Process(String sharepointSiteLocation, IDictionary`2 parameters) at AWS.SLAM.Administration.Synchronization.DoSynchronization(SPSite site, String typeName, String typeId, String typeSiteCollection, String typeSite)

Do you have any ideas, what could be wrong?

Thanks!

Developer
Jan 21, 2011 at 4:27 PM

I am assuming your database has a generated table for the association "HandlingsplanToDeplunkter" since you are not getting an error for a missing table.  But if that table exists  I would expect it to have a column called DelpunkterListItemID and a column called HandlingsplanerListItemID.  Are these its columns?

Jan 26, 2011 at 7:55 AM

At some point I had a column with "-" in the name. I removed that and then it worked.