I am setting the Address of a class generated by Linq 2 Sql and when I try to SubmitChanges(), the sql query it generates is:
Update Users
Set Address = @po
Where 0 = 1
--@po: Input VarChar (Size = 15; Prec = 0; Scale = 0) [123 45th Street]
I can't figure out why I am getting Where 0 = 1.
This can happen when your object model differs from the database even by one property.
Is it possible that Address is nullable in the database and not in your model, or the other way around? Or the type differs, say ntext vs nvarchar, etc? In some cases it can be another unrelated property...think back to the last change to the database or model you made, make sure that's in sync.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With