views:

204

answers:

3

hi there,

im using subsonic 3.0.0.3 activerecord and everything is fine and i get no error but when i update a database, it never seems to actually happen, can anyone spot anything i am missing here?! ta

code:

var myquote = createNewQuote();

var gross = 36.00;

myquote.totalcost = gross;  // set the new value in my model

UpdateModel(myquote); // update the model, something to do with dirty columns??

if(ModelState.IsValid) // check to make sure i have no errors in my model after changing it
            myquote.Update(); // command that is supposed to update the database????

i have put a break point on UpdateModel and looked into the model and the value is in the model as directed, i get no error and modelstate is valid too, but when i look into the database the totalcost has not actually been changed for that record????

i have also tried .Save() but this too does not seem to change anything ?????

am a little puzzled

+2  A: 

not sure if this fixes your problem but I know there a few bugs fixed here that helped me out with a few isssues I was having.

Goto: http://github.com/subsonic/SubSonic-3.0/tree/master

Slee
yeah they where mainly bugs with bool, and double etc have applied latest stuff but will have another look...... i have seen something about a Guid() and think it could be something to do with that but not sure how to apply it to this specific code when i have just created a new quote rather than selecting...... maybe you have to add, then select and then update ??????
minus4
+2  A: 

There was a bug introduced in 3.0.0.1 that I removed quickly with 3.0.0.2 that inhibited updates in certain scenarios with ActiveRecord. Our current version is 3.0.0.3 - you should update.

Rob Conery
sorry i meant 3.0.0.3 the 1 was a mistake, the dll info shows as .3if you want to see the full code then let me know.ta
minus4
A: 
Fleents