Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SaveEntity() does not save
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01331050
Message ID:
01331051
Views:
9
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();
> }
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform