This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hello I am having trouble using savechanges(). In the situation presented below, I have modified an existing ctCompany entry in my database. I then call unitofwork.savechanges() and I get this exception. Any Ideas? Exception:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Desc = NULL, Distributor = 0, Domain = NULL, Employees = NULL, Name = 'A' at line 6
Code:
try { if ((string)this.btnAdd.Content != "Edit") { uow.Add(this.company); } uow.SaveChanges(); }
|
|
|
This might mean that you're using a reserved word as a column name and therefore need to turn on LightSpeedContext.QuoteIdentifiers. If you can post the generated SQL (set LightSpeedContext.Logger = new TraceLogger()) we can probably make a more informed suggestion. |
|
|
That worked just fine thanks again! |
|