Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SaveEntity() does not save
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01331050
Message ID:
01331051
Vues:
10
You need to issue a NewEntity() first to establish the addition of a new row, fill in the appropriate values and then issue SaveEntity().

>For the last 3 hours I could not get this to work:
>
>I have a table "MalGlavNext" with a primary key consisting in 3 fields "sifra_trgovine", "broj_kase", "vrsta_prometa"
>
>I'm calling a stored procedure MalGlavNextSelectByPK (created by BLG), when there is a record to be returned all works OK, but if there is no record for the given primary key I would like to insert that record.
>
>For that I call SaveEntity() after setting all properties. SaveEntity() returns RulePassed, but the data is not saved to the table.
>
>What am I doing wrong ?
>
>here is the code:
>
> MalGlavNextEntity ent = this.GetEntity("MalGlavNextSelectByPK",
> new IDbDataParameter[] { dao.CreateParameter("@sifra_trgovine", sifra_trgovine),
> dao.CreateParameter("@broj_kase", broj_kase),
> dao.CreateParameter("@vrsta_prometa", vrsta_prometa)});
>
> if (ent.br_racuna == null)
> {
> ent.br_racuna = "1";
> ent.sifra_trgovine = sifra_trgovine;
> ent.broj_kase = broj_kase;
> ent.vrsta_prometa = vrsta_prometa;
> mmSaveDataResult result=this.SaveEntity();
> }
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform