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
|
I have a requirement on a SQLCE table to set the Id field to a value as previously defined in another database. I understand this is possible using the GenerateId override. Below is the override code I have created in a partial class. partial class PoSMenu protected override object GeneratedId() The problem I experience is, in my code, I first try a FindById<PoSMenu>(x) to see if the record already exists. Even when the table is empty, I receive the following error on this command. There was an error parsing the query. [ Token line number = 3,Token line offset = 11,Token in error = < ] Upon checking the SQL set to the database, it seems a little strange. See below... A first chance exception of type 'System.Data.SqlServerCe.SqlCeException' occurred in System.Data.SqlServerCe.dll I am sure I am doing something wrong, and it is probably very obvious to someone else, but I cannot see it. Can someone please advise what I am doing wrong. Many thanks. |
|
|
Hi Mark, Try not using an automatic property and then attributing the field as [Transient] so LightSpeed doesn't include it in the query. I hope that helps, John-Daniel |
|
|
Worked great, thanks. |
|