Login Skip Navigation LinksWilsonORMapper > Forums Search
Demo Version Demo Version
Download and try for yourself a fully working demo version, including sample apps and documentation.  The only limitation is that the demo version only works inside the debugger.

PayPal Subscribe
Get It All for $50 USD:
WebPortal, ORMapper,
Source Code, All Updates
PayPal

User Login User Login
Log In
 
 
Reset Password

Wilson ORMapper Forums Wilson ORMapper Forums : Bugs & Issues : Updating Table

Date Post
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");