General information
Category:
The Mere Mortals .NET Framework
Environment versions
Network:
Windows 2008 Server
Hi all,
I have a web service that receives a table from a mobile app. I then am looking to loop through the incoming records and update or add the records as required. I try this following code and figured it should work and be a bit of a shorter route than a field by field replacement into the SQL Server. However, this code does not add a record into the SQL Server even though there are no errors and it returns a result of rulespassed. Any one have any ideas on why it is not working:
MOBWORKORDREntity inEntity = new MOBWORKORDREntity();
inEntity.SetDataRow(dtUpdWork.Rows[lnRowCnt]);
oWork.GetMobWorkOrdersByPK(inEntity.PKMOBWORKORDR);
oWork.CreateEntityList();
if (oWork.EntityList.Count == 0)
oWork.EntityList.Add(inEntity);
else
oWork.Entity = inEntity;
mmSaveDataResult Result = oWork.SaveEntityList();
dtUpdWork is the table passed back and has an identical structure to the table in the SQL Server.
Any assistance would be appreciated. Thanks.
Ian
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only