| 4/8/2007 10:19:59 AM |
Hi, We have a simple table that we are trying to update as follows :
OPathQuery query = new OPathQuery(typeof(PerryWorld.Productfolio.BusinessObjects.TblCompany), "CompanyId == 123";
PerryWorld.Productfolio.BusinessObjects. TblCompany company = (PerryWorld.Productfolio.BusinessObjects.TblCompany)Manager.Engine.GetObject(query);
company.TrialVersion = "N";
company.TrialPeriod = 0;
Manager.Engine.StartTracking(company, Wilson.ORMapper.InitialState.Updated);
Manager.Engine.PersistChanges(company, PersistDepth.SingleObject);
But we get an error saying "Line 1: Incorrect syntax near ';'."
Any help would be appreciated
Thanks Rich
|
| 4/8/2007 10:14:47 PM |
Hi There, I'm not sure you if typed the code or done a copy/paste but you are missing a closing parenthesis after "CompanyId == 123" to close the OPathQuery class Constructor.
it probably should be:
OPathQuery query = new OPathQuery(typeof(PerryWorld.Productfolio.BusinessObjects.TblCompany), "CompanyId == 123"); |
| 4/9/2007 8:27:34 AM |
Thanks for the reply - it was a typo
OPathQuery query = new OPathQuery(typeof(PerryWorld.Productfolio.BusinessObjects.TblCompany), "CompanyId == 123");
I'm still getting the same problem.
Cheers Rich
|
| 5/1/2007 11:05:25 PM |
Hi There, I'm not sure you if typed the code or done a copy/paste but you are missing a closing parenthesis after "CompanyId == 123" to close the OPathQuery class Constructor.
it probably should be:
OPathQuery query = new OPathQuery(typeof(PerryWorld.Productfolio.BusinessObjects.TblCompany), "CompanyId == 123"); |