I am not running Mike's latest code because it does not build and he didn't update the templates to generate code for the new Load with columns he added. So I am one revision back in the source.
My database has tables in multiple schemas and they would not update properly.
In SubSonic.Query Update.cs I needed to change the constructor. I include some lines for context but I had to change line 122 to add tbl.SchemaName so that the correct DatabaseTable constructor was called and the schema name was carried through.
From this:
public Update(ITable table)
{
_query = new SqlQuery(table.Provider);
_provider = table.Provider;
_query.QueryCommandType = QueryType.Update;
ITable tbl = table;
DatabaseTable dbTable = new DatabaseTable(tbl.Name, _provider, tbl.ClassName);
dbTable.Columns = tbl.Columns;
_query.FromTables.Add(dbTable);
}
To this:
public Update(ITable table)
{
_query = new SqlQuery(table.Provider);
_provider = table.Provider;
_query.QueryCommandType = QueryType.Update;
ITable tbl = table;
DatabaseTable dbTable = new DatabaseTable(tbl.SchemaName, tbl.Name, _provider, tbl.ClassName);
dbTable.Columns = tbl.Columns;
_query.FromTables.Add(dbTable);
}