Welcome Guest Search | Active Topics | Members | Log In | Register

Bulk Insert and Updates with WDMF Options · View
dukefama
Posted: Sunday, July 15, 2012 4:09:10 AM
Rank: Newbie Coder
Groups: Member

Joined: 3/1/2009
Posts: 10
Points: 30
Location: Nigeria
Hi all,
I am working on a project that see me using WebOrb to do bulk inserts and also checking before insert if the record exist already. This I have done. And what I did was:

Create the object, check if it exist and write it to the database (this is done on the load even of the ArrayCollection)

Since there is no way yo do this synchronously, what would you suggest?
HaugachakaMan
Posted: Monday, July 16, 2012 9:06:44 AM
Rank: Newbie Coder
Groups: Member

Joined: 5/31/2012
Posts: 7
Points: 18
Location: Portugal - Lisbon
Hey there.

I couldn't understand were exactly was your problem.
Was it on checking the records after inserting a new one? Or was it loading the records (with the new ones) after inserting then?

Cheers
dukefama
Posted: Monday, August 06, 2012 4:57:30 PM
Rank: Newbie Coder
Groups: Member

Joined: 3/1/2009
Posts: 10
Points: 30
Location: Nigeria
The challenge I have is this. I want to display a progress bar for the insert but I cant. I dont knw when all the items are saved to the database to that I can return a message that says all items are saved. for example
for each(var selectedStudent:Object in _StudentsList)
{
//obj.toString();
for each(var subs:Object in _ClassSubjects)
{
// Save students against subject here
// but check first
SaveAssessment(subs.SubjectName, selectedStudent as Students,txtAssessType.text);



}
}
dukefama
Posted: Monday, August 06, 2012 4:58:01 PM
Rank: Newbie Coder
Groups: Member

Joined: 3/1/2009
Posts: 10
Points: 30
Location: Nigeria
The challenge I have is this. I want to display a progress bar for the insert but I cant. I dont knw when all the items are saved to the database to that I can return a message that says all items are saved. for example
for each(var selectedStudent:Object in _StudentsList)
{
//obj.toString();
for each(var subs:Object in _ClassSubjects)
{
// Save students against subject here
// but check first
SaveAssessment(subs.SubjectName, selectedStudent as Students,txtAssessType.text);



}
}
HaugachakaMan
Posted: Wednesday, August 08, 2012 1:22:40 AM
Rank: Newbie Coder
Groups: Member

Joined: 5/31/2012
Posts: 7
Points: 18
Location: Portugal - Lisbon
Hey there

I had a similar problem, the best solution for me to keep track of the progress was a counter in the save process

for (var i:int = 0; i{
SaveFunction();
}

I could keep track of the progress with the i variable, depending on where you want to keep track just put the variable on the first or the second for.
Note that the fact that the variable has been incremented does not mean that the record will be on you DataBase, you're only sure that the request has been made.
If you want to be sure the record is there use an AsyncToken with you save.

Let me know if it helps.

Cheers
dukefama
Posted: Thursday, August 09, 2012 12:22:56 AM
Rank: Newbie Coder
Groups: Member

Joined: 3/1/2009
Posts: 10
Points: 30
Location: Nigeria
It did help. I had that in mind somehow, just felt there should prolly be a better way.

Thanks a lot!
Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

YAFVision Theme Created by Jaben Cargman (Tiny Gecko)
Powered by Yet Another Forum.net version 1.9.1.8 (NET v2.0) - 3/29/2008
Copyright © 2003-2008 Yet Another Forum.net. All rights reserved.
This page was generated in 0.134 seconds.