hi Tim

I'd like to try out you've done. Is there a tutorial anywhere you 
can recomend.

regadrs
Bod

--- In [email protected], "timgerr" <[EMAIL PROTECTED]> 
wrote:
>
> OK, I found out how to do this.  When updating a row I have to 
specify
> the row id, I think that is all. That is how I got it to work.
> 
> So if I have this 
> _master = ActiveRecords.Test.findByIdAndName('6','tessa');
> _master[0].Email = "[EMAIL PROTECTED]";
> _master[0].Name = "tessa";
> _master[0].Id = 6;
> 
> 
> I then create the test method (I think that is what you call it)
> var i:Test = new Test();
> i.Name = Tess;
> i.Email = "[EMAIL PROTECTED]";
> i.Id = 6;
> var asyncToken:AsyncToken = null;
> asyncToken = i.save();
> asyncToken.addResponder(new mx.rpc.Responder (OnCreated,OnFault));
> 
> That is it, that is how I got it to work.  Man this Weborb rocks.  
I
> have a few other questions that I will be posting
> 
> 
> 
> --- In [email protected], "timgerr" <tim.gallagher@> 
wrote:
> >
> > Let me make this a little more clear:
> > I am good at looking at code so here is what I am doing.  I want 
to
> > call a database row using findby and ad that information into an 
array
> > collection:
> > private var _master:ArrayCollection = new ArrayCollection(); 
> > _master = ActiveRecords.Test.findByIdAndName('6','tessa');
> > 
> > so now master[0] has Id, Email, Name
> >  so if I wanted to change the name from tessa to
> > tess, not sure what to do.
> > 
> > Thanks for the read.
> > timgerr
> > 
> > 
> > --- In [email protected], "timgerr" <tim.gallagher@> 
wrote:
> > >
> > > Mark, Thanks for the reply, I am getting closer to learning 
how to do
> > > an update.
> > > 
> > > I am good at looking at code so here is what I am doing.  I 
want to
> > > call a database row using findby and ad that information into 
an array
> > > collection:
> > > private var _master:ArrayCollection = new ArrayCollection(); 
> > > _master = ActiveRecords.Test.findByIdAndName('6','tessa');
> > > 
> > > so now master[0] has Id, Email, Name
> > > so if I wanted to change the email from tsa@ to
> > > tsa@, I do this?
> > > 
> > > private var uDate:Test = new Test();
> > > uDate.Name = 'tessa';
> > > uDate.Id   = '6';
> > > udate.Email = 'tesa@';
> > > 
> > > var asyncToken:AsyncToken = null;
> > > asyncToken = uDate.save();
> > > 
> > > How does webord know the difference between an updated and new 
record?
> > > 
> > > Thanks for the help,
> > > timgerr
> > > 
> > > 
> > > 
> > > --- In [email protected], "Mark Piller" <mark@> wrote:
> > > >
> > > > Hi Tim,
> > > > 
> > > > For any instance of Active Record on the client side you can 
change
> > > > the properties and then call save() on that instance. It 
will update
> > > > the record in the database and also issue client 
synchronization
> event
> > > > so other clients that have the same record would be updated.
> Instances
> > > > of active record are loaded with any of the findXXX methods.
> > > > 
> > > > Hope this helps.
> > > > 
> > > > Mark
> > > >
> > >
> >
>


Reply via email to