Hi list,
i'm updating an online mysql database with 3 fields, in 982 records and
basically its unreliable it doesn't manage top do all the updates or even a
consistent numberit usually falls about 100 short.
Tha data i want to upload is stored in an individual propertylist in a
second list which in turn is stored in a single master list ie the place
data is gmasterpredlist[i][j].place.
the approach i am using is to step through the masterlist and build a list
for each record and then use postnettext to an asp page that does a very
simple UPDATE command. I think that the problem is probably to do with post
982 records to the page in quick succession and either the asp or mysql not
being able to handle it well enough. I've put a little routine in director
to wait for the last network op being ok but i'd appreciate someone looking
at it and confirming the logic for me.
my director code is
webresults =[]
webpredresult = [#gameNo:1, #points:0 , #predID:2, #twocorrect:0, #place:1]
gmasterpredcount = gmasterpredlist.count
repeat with i = 1 to gmasterpredcount
areacount = gmasterpredlist[i].count
repeat with j = 1 to areacount
if gmasterpredlist[i][j].predID > 1 then
webpredresult.gameNo = gmasterpredlist[i][j].gameNo
webpredresult.points = gmasterpredlist[i][j].points
webpredresult.predID = gmasterpredlist[i][j].predID
webpredresult.twocorrect = gmasterpredlist[i][j].twocorrect
webpredresult.place = gmasterpredlist[i][j].place
webresults.append(webpredresult)
netID = postNetText("http://www.targetdomain.com/uploadthePredData.asp",
webpredresult)
waitfornet()
timeout("intervalTimer").forget()
end if
end repeat
end repeat
put webresults.count
end
-- routines to make sure network operation ghas finished before next one is
called
on waitfornet ()
ok = false
ok = timeout("intervalTimer").new(100, #checknet)
repeat while ok = false
nothing
end repeat
return
end
on checknet ()
if netError() = 0 then
timeout("intervalTimer").forget()
return true
else
return false
end if
end
any suggestions for a more reliable way to do this much appreciated
Lee Blinco
Multimedia Developer
AVR Productions
+44 (0)1462 819603
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL
PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping
with programming Lingo. Thanks!]