Subsonic 2.2/2.1 bug

subsonic

This is not a question but a bug in subsonic 2.1/2.2

The method

public QueryCommand BuildUpdateCommand(Query qry)

in Dataprovider.cs

generates and invalid Update statement if the Table to be updated is a member of a Schema, i.e. a Schema other than "dbo".

The offending line is

sql.Append(qry.Provider.DelimitDbName(table.Name));

The resulting SQL is "Update <tableName> SET....."
However the correct SQL should be "Update <SchemaName>.<tableName>...."

Commenting out the above line and replacing it with:

sql.Append(table.QualifiedName);

generates the correct SQL.

Best Answer

Reporting this to the product's developers may be a better option in getting it solved.