DaveK
DaveK

Reputation: 719

Entity Framework Update statement generating invalid SQL for Firebird

I'm using Firebird 2.5.0 with the Entity Framework, which has been working well. However, recently I have changed something (I presume) and now the SQL that is being generated when I try to save my changes is not valid for Firebird:

update ( select [fields] from [table]) set [field] = @p0 where ([keyfieldn = @pn])

As far as I know, Firebird 2.5.0 does not support this syntax, and when I try to save changes I get back a SQL error that says as much ( "Token unknown, column 8: (" )

I'm not sure what to do now. What would cause the UpdateTranslator instance to generate this SQL instead of whatever it must have been generating before I broke it?

Upvotes: 1

Views: 526

Answers (1)

DaveK
DaveK

Reputation: 719

I went back through the edmx file and found that I had gotten some 'DefiningQuery' elements when I had it pull in some new fields from the database. I couldn't find any way to access those settings in the interface, so I just deleted them from the file and it is working correctly again.

Upvotes: 1

Related Questions