views:

119

answers:

1

I've just recently been using the EF just because I thought it was simplier and faster to have a DAL that way...but it's a pain in the ....s

After solving severam problems I can't sucessfully updade dada from my tables in a sql database.

I have a aspx form that edits some fieds in the entity object (System.Data.Objects.DataClasses.EntityObject) and then I call the EntitiesContext.SaveChanges()...and it actually saves changes. But in the WRONG way.

For instance if the forma has this data: Name:abcd Number:1234

the saved data will be Name:a Number:1

Please don't send me begginers documentation I've seen it all! And yes... I have the Store procedures created and I've recreated the .edmx several times!

Thank you.

+1  A: 

Is it possible that your stored procedures are bringing in parameters that are only 1 character long? I don't do any EF work, but I have had problems in the past where I will accidentally declare parameters in my stored procedures wrong and it will only work with as much data as could fit in the wrongly-declared params.

TheTXI
thank you. but its not that
Txugo
Ok. I had a feeling it wasn't but I don't think it hurts to cover all possible bases.
TheTXI
I'm so ashamed. You'r right....!!!I had @FName as VarChar because I thought they would put some default 256 or somthing...like in sql 2000!Thank you!
Txugo
Hey then, I'm glad that worked for you!
TheTXI