functions to update DB don't wait for each other 
Author Message
 functions to update DB don't wait for each other

I have a client side Jscript function that DELETE's fields in 2 SQL
database tables. The first DELETE must be complete before DELETE'ing the
second for this to work.

What is happening is that the script executes the first DELETE then
immediately tries to execute the second DELETE without waiting for the
first to finish. This results in an error with the second DELETE.

Is there any way to make the function wait for a result from the first
update before attempting the second? I've tried using the
"ondatasetcomplete" event with the first recordset (rsChangeMembers) but
it doesn't work. I assume this is because the recordset is not actually
returning records?

Here is the function I am calling:

function cmdDelete_onclick() {
        strSQL = "DELETE FROM dbo.Translation " +
                        "WHERE (groupID = " + groupID + ")";




Thanks in advance for any light you can shed on this problem.


Sat, 24 Nov 2001 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Update: Rollovers don't work in IE

2. Public Folder Posts Don't Update

3. Database updates don't appear...

4. locking databases (don't want more than one user to update at a time)

5. network functions don't work in login scripts in 95

6. Functions don't run in server side javascript

7. GS: Some PS-Files work - others don't (I'm lost!!)

8. Don't understand 'Set'

9. Questions about nesting functions, try...catch and others

10. List Box Doesn't Get Updated After Create/Update/Delete Event

11. Ghostscript's ps2ascii don't work

12. Some Apples print and others don't. (font problems?)


Powered by phpBB® Forum Software