Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SaveEntityList
Message
De
24/09/2008 12:15:48
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
 
 
À
24/09/2008 10:14:23
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Versions des environnements
Environment:
VB 9.0
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01350186
Message ID:
01350230
Vues:
22
Hi Ian,

>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

Is your web service an MM DataAccess web service or a mm DataAccess WCF service or a standard Web Service?

Where is this code you are showing located?
Have you stepped through this code to verify the values in InRowCnt, inEntity.P{KMOBWORKORDR?
Does oWork.EntityList.Count evaluate to 0?

I am a littel intrigued by your second line of code where you are calling SetDataRow. What is the intent here? Does the following line actually give you a value in inEntity.PKMOBWORKORDR?
Tim
Timothy Bryan
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform