Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > connection.execute = asynchronous process ??

Reply
Thread Tools

connection.execute = asynchronous process ??

 
 
Jill Graham
Guest
Posts: n/a
 
      10-03-2003
Hi,


I'm using an access database and found following problem :

I have a table X with 2 records : record 1 & record 2. I execute following
procedure with 2 steps :
1. The procedure deletes records 1 : connection.execute "delete from X
record 1"
2. The procedure adds record 1 again using the recordset object.

Result : nothing happens !
I have the feeling that the "delete" statement is executed AFTER the "add
record" statement. Or the "delete" statement did not finish before the
start of the "add record" statement (= asyncrhonous processing).

Can somebody explain me this behavior ?
I have this problem only when using a MS Access database and not with an MS
SQL database.

Jill


 
Reply With Quote
 
 
 
 
Ray at
Guest
Posts: n/a
 
      10-03-2003
Can you show your code?

Ray at work

"Jill Graham" <> wrote in message
news:ew$...
> Hi,
>
>
> I'm using an access database and found following problem :
>
> I have a table X with 2 records : record 1 & record 2. I execute

following
> procedure with 2 steps :
> 1. The procedure deletes records 1 : connection.execute "delete from X
> record 1"
> 2. The procedure adds record 1 again using the recordset object.
>
> Result : nothing happens !
> I have the feeling that the "delete" statement is executed AFTER the "add
> record" statement. Or the "delete" statement did not finish before the
> start of the "add record" statement (= asyncrhonous processing).
>
> Can somebody explain me this behavior ?
> I have this problem only when using a MS Access database and not with an

MS
> SQL database.
>
> Jill
>
>



 
Reply With Quote
 
 
 
 
Dan Brussee
Guest
Posts: n/a
 
      10-03-2003
On Fri, 3 Oct 2003 17:15:36 +0200, "Jill Graham"
<> wrote:

>Hi,
>
>
>I'm using an access database and found following problem :
>
>I have a table X with 2 records : record 1 & record 2. I execute following
>procedure with 2 steps :
>1. The procedure deletes records 1 : connection.execute "delete from X
>record 1"
>2. The procedure adds record 1 again using the recordset object.
>
>Result : nothing happens !
>I have the feeling that the "delete" statement is executed AFTER the "add
>record" statement. Or the "delete" statement did not finish before the
>start of the "add record" statement (= asyncrhonous processing).
>
>Can somebody explain me this behavior ?
>I have this problem only when using a MS Access database and not with an MS
>SQL database.
>
>Jill
>


I think your going to have to explain this a little better. You say
you use Access, but also refer to a procedure. Is the Procedure
something in ASP?

Step 1: conn.execute "DELETE FROM X Where ID = 1"
Step 2: conn.execute "INSERT INTO X (a,b,c) VALUES (1,2,3)"

This kind of thing should work. The normal action of the connection
object is NOT asynchronous, so I doubt that is your problem.

When you say nothing happens, does the first record get deleted? Does
the new record not get added?


 
Reply With Quote
 
Jill Graham
Guest
Posts: n/a
 
      10-03-2003
Hi Dan,

Correct, this is a procedure in ASP

Table X has two records : ID = 1 and ID = 2

The procedure is as follows :
Step 1: conn.execute "DELETE FROM X Where ID = 1"
Step 2: rs.open "table X", <options>
rs.addNew
rs("ID") = 1
rs.update
rs.close

Result of the procedure : the record is deleted (step 1) but step 2 has no effect.

When I replace step 2 with following statement : conn.execute "INSERT INTO X (ID) VALUES (1)", then everything works fine.

Why doesn't the recordset work ?



"Dan Brussee" <> wrote in message news:...
> On Fri, 3 Oct 2003 17:15:36 +0200, "Jill Graham"
> <> wrote:
>
> >Hi,
> >
> >
> >I'm using an access database and found following problem :
> >
> >I have a table X with 2 records : record 1 & record 2. I execute following
> >procedure with 2 steps :
> >1. The procedure deletes records 1 : connection.execute "delete from X
> >record 1"
> >2. The procedure adds record 1 again using the recordset object.
> >
> >Result : nothing happens !
> >I have the feeling that the "delete" statement is executed AFTER the "add
> >record" statement. Or the "delete" statement did not finish before the
> >start of the "add record" statement (= asyncrhonous processing).
> >
> >Can somebody explain me this behavior ?
> >I have this problem only when using a MS Access database and not with an MS
> >SQL database.
> >
> >Jill
> >

>
> I think your going to have to explain this a little better. You say
> you use Access, but also refer to a procedure. Is the Procedure
> something in ASP?
>
> Step 1: conn.execute "DELETE FROM X Where ID = 1"
> Step 2: conn.execute "INSERT INTO X (a,b,c) VALUES (1,2,3)"
>
> This kind of thing should work. The normal action of the connection
> object is NOT asynchronous, so I doubt that is your problem.
>
> When you say nothing happens, does the first record get deleted? Does
> the new record not get added?
>
>


 
Reply With Quote
 
Ray at
Guest
Posts: n/a
 
      10-04-2003
Is there an On Error Resume Next in your code? If not, what does your real
code look like?

Ray at work

"Jill Graham" <> wrote in message
news:...
Hi Dan,
Correct, this is a procedure in ASP
Table X has two records : ID = 1 and ID = 2
The procedure is as follows :
Step 1: conn.execute "DELETE FROM X Where ID = 1"
Step 2: rs.open "table X", <options>
rs.addNew
rs("ID") = 1
rs.update
rs.close
Result of the procedure : the record is deleted (step 1) but step 2 has no
effect.
When I replace step 2 with following statement : conn.execute "INSERT INTO X
(ID) VALUES (1)", then everything works fine.
Why doesn't the recordset work ?


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Asynchronous process from asp.net page button click event? Ritha Software 0 09-29-2009 02:20 PM
How to make the system.process as asynchronous from asp.net page button click event? Ritha Software 0 09-29-2009 07:17 AM
Asynchronous process to process pipe IO Pito Salas Ruby 11 08-26-2009 09:13 AM
Process Cannot access file "file_name" because it is being used by another process Rithesh Pai ASP .Net 1 08-22-2005 03:02 PM
A process serving application pool 'DefaultAppPool' exceeded time limits during start up. The process id was '216'. jack ASP .Net 0 08-01-2004 09:49 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57