accessing objects
Posted: Fri Aug 07, 2009 2:48 pm
by beginner >> Tue, 20 Jan 2004 3:30:39 GMT
Hi,
I'm a newby in JADE. I would like to know how to access an object. For example ,I created a class People which has attributes sFirstname ,sLastname and sAge . Then I creaded method in JadeScripts to add people
addPeople();
vars
man : People;
begin
beginTransaction;
create man;
man.sFirstname:="Paul";
man.sLastname:="Frank";
man.sAge:="25";
create man;
man.sFirstname:="Sam";
man.sLastname:="Huang";
man.sAge:="30";
create man;
man.sFirstname:="Jimmy";
man.sLastname:="Wong";
man.sAge:="18";
commitTransaction;
end;
After compiled and excuted the script, three instances've been created. How can I delete some instance out of database.
This is my code to delete first instance:
begin
beginTransaction;
delete People.instances.last;
commitTransaction;
end;
Can someone explain how to delete instance beteween first and last instance?
Hi,
I'm a newby in JADE. I would like to know how to access an object. For example ,I created a class People which has attributes sFirstname ,sLastname and sAge . Then I creaded method in JadeScripts to add people
addPeople();
vars
man : People;
begin
beginTransaction;
create man;
man.sFirstname:="Paul";
man.sLastname:="Frank";
man.sAge:="25";
create man;
man.sFirstname:="Sam";
man.sLastname:="Huang";
man.sAge:="30";
create man;
man.sFirstname:="Jimmy";
man.sLastname:="Wong";
man.sAge:="18";
commitTransaction;
end;
After compiled and excuted the script, three instances've been created. How can I delete some instance out of database.
This is my code to delete first instance:
begin
beginTransaction;
delete People.instances.last;
commitTransaction;
end;
Can someone explain how to delete instance beteween first and last instance?